X-ray spectroscopic studies of nickel complexes, with application to the structure of nickel sites in hydrogenases