Hierarchically porous carbon derived from polymers and biomass: effect of interconnected pores on energy applications