N-doped porous carbon from different nitrogen sources for high-performance supercapacitors and CO2 adsorption