Ab initio study of structural, electronic and thermodynamic properties of tungstate double perovskites Ba2MWO6 (M = Mg, Ni, Zn)