N-doped catalytic graphitized hard carbon for high-performance lithium/sodium-ion batteries