Contribution of phenotypic heterogeneity to adaptive antibiotic resistance