A 30-storey skyscraper under construction has collapsed in Bangkok, where a state of emergency has been declared.