Pathogen infection dynamics and the evolution of host resistance and tolerance