Thermal Stability of Some Phosphorus-Containing Polyesters and Polyesterimides