First-principles analysis of the stability of water on oxidised and reduced CuO(111) surfaces