Design of nitrogen-containing carbonaceous adsorbents for CO2 capture and energy storage applications