Mechanism of ion and emitter formation due to cyanogen in hydrogen-oxygen-nitrogen flames