Mechanism of thermal degradation of fire retardant melamine salts.