Thermal decomposition of styrenic polymers modified with covalently bound P- and N-containing groups: analysis of the gaseous-phase mechanism