Optical free induction decay of molecules undergoing radiative and radiationless relaxation