Three-dimensional hierarchically porous MoS2 foam as high-rate and stable lithium-ion battery anode