On the origin of the enhanced supercapacitor performance of nitrogen-doped graphene