Thermodynamic Analysis of the Formation of Carbon Nitrides under Pressure