Japan has lifted a long-standing ban on exporting lethal weapons, marking a major shift away from its post-World War Two pacifist policy.