At least 29 people were killed and dozens injured after a construction crane collapsed onto a train in Thailand.