Thermodynamics of Metal Nanoparticles: Energies and Enthalpies of Formation of Magnesium Clusters and Nanoparticles as Large as 1.3 nm