Hydration of magnesite and dolomite minerals: new insights from ab initio molecular dynamics