Quantum theory of post-collision interaction in inner-shell photoionization