Mathematical models of within-host and population-level infection dynamics