Completeness of states, shadow states, Heisenberg condition, and poles of the S-matrix