Electronic structure of Ni and Pd alloys. I. X-ray photoelectron spectroscopy of the valence bands