Detecting bacterial adaptation within individual microbiomes