Rational design of Ni/Ni2P heterostructures encapsulated in 3D porous carbon networks for improved lithium storage.