Intensity and polarization line profiles in a semi-infinite Rayleigh-scattering planetary atmosphere. I. Integrated flux