Interactions of Inosine 5′-Monophosphate with Ca2+ and Mg2+: A Thermodynamic and Spectroscopic Study in Aqueous Solution