Ultrafine Ni5P4 nanoparticles embedded in 3D porous carbon foams for high-performance lithium-ion and potassium-ion batteries