Thermal hazard assessment and safe, scalable synthesis of energetic diazo and azide compounds