Lithium sulfur batteries with compatible electrolyte both for stable cathode and dendrite-free anode