Evolutionary ecology of learning: insights from fruit flies