There was applause in Japan’s parliament as members voted in the country’s first woman prime minister.