Quasinormal-Mode Expansion of the Scattering Matrix