Theory of intrinsic and extrinsic excitation effects in deep core XPS spectra studied by the many-body scattering theory