Thermal, mechanical and phase stability of LaCoO3 in reducing and oxidizing environments