Pathogen evolution within and between hosts with applications to the pneumococcus and SARS-CoV-2.