Insights into the function of silver as an oxidation catalyst by ab initio atomistic thermodynamics