Adaptive metabolic strategies in consumer-resource models