Thermal degradation of CH3NH3PbI3 perovskite into NH3 and CH3I gases observed by coupled thermogravimetry–mass spectrometry analysis