The prime minister of Japan has announced that he will not run for another term, and will instead leave the political arena after only a year in office.