Japanese Prime Minister Shinzō Abe ended weeks of speculation about the state of his health by announcing his surprise resignation on Friday.