Magnesium energy storage