Theoretical X-ray photoelectron and emission spectra of Si- and S-containing polymers by density-functional theory calculations using model molecules