Thermal degradation of polyimides—II: Mechanism of carbon dioxide formation during thermal degradation