Self-discharge of magnesium–sulfur batteries leads to active material loss and poor shelf life