Controllable nitrogen-doping of nanoporous carbons enabled by coordination frameworks