Transient scattering of resonance radiation in a two-level system