Template-free synthesis of N-doped carbon with pillared-layered pores as bifunctional materials for supercapacitor and environmental applications