First principles investigations of the structural, elastic, vibrational, and thermodynamic properties of TiMg2O4 oxide spinels: cubic and tetragonal phases