Police in Taiwan are investigating the cause of an explosion on a train at a railway station in the capital, Taipei, that injured 21 people.