Text this: Stability, Electronic Structure and Thermodynamic Properties of Nanostructured MgH<sub>2</sub> Thin Films