US House Speaker Nancy Pelosi became the highest-ranking American politician to visit Taiwan in 25 years, prompting China to announce military drills encircling the island.