Metal film growth on regular and defective MgO(0 0 1) surface: A comparative ab initio simulation and thermodynamic study