3D hierarchical nitrogen-doped carbon nanoflower derived from chitosan for efficient electrocatalytic oxygen reduction and high performance lithium–sulfur batteries