Preparation of nitrogen-doped macro-/mesoporous carbon foams as electrode material for supercapacitors