Electronic structure of the intermediate-valence compound EuNi2P2 studied by soft x-ray photoemission spectroscopy