Drivers of within-host genetic diversity in acute infections of viruses