Diffraction of X-rays and hydration phenomena in aqueous solutions of Mg(NO3)2