Time-dependent infectivity and flexible latent and infectious periods in compartmental models of plant disease.