Revealing the improved stability of amorphous boron-nitride upon carbon doping