Reflectivity and transmissivity of a cavity coupled to two-level systems: Coherence properties and the influence of phase decay