Prime Minister Shinzo Abe won a ruling party leadership vote, setting him on track to become Japan’s longest-serving premier.