Anisotropy and anharmonicity in the zero-point motion of protons in ice and liquid water