Direct production of nitrogen-doped porous carbon from urea via magnesiothermic reduction