The genomic basis of ecological adaptation in a Drosophila agricultural pest