Spin States of Cobalt Ions in the Bulk and on the Surface of LaCoO3 Probed by X-ray Absorption, Emission, and Photoelectron Spectra