Kinetics of phase transitions in the presence of an intermediate metastable state: a generic model