Structure-function relations in water-oxidizing cobalt oxides investigated by X-ray absorption spectroscopy