Orthogonal polynomials from the viewpoint of scattering theory