Stability and reactivity of hydrated magnesium cations