MoS2 nanosheets inlaid in 3D fibrous N-doped carbon spheres for lithium-ion batteries and electrocatalytic hydrogen evolution reaction