Phase change, band gap energy and electrical resistivity of Mg doped TiO2 multilayer thin films for dye sensitized solar cells applications