Think of enzymes and biochemistry as an investment. If you are a big player (a cow), then the investment in enzymes is small change for you, but might give you a pretty good return. You invest as much as you can and try to diversify. But if you consistently don't get your money's worth, then even small change is better be kept for yourself. So if a cow does not eat much meat, keeping meat-digesting enzymes is just not worth it - they will be lost during evolution.
On the other hand, if you invest in several companies and one of them suddenly starts giving better returns, then it might be a good idea to invest a little bit more into that company. Not put everything in there, just adjust it a little. This does not require evolution, just redistribution of resources. It is called enzyme upregulation.
For small players, bacteria, the situation is a bit different. They don't have that much money, so their investment stratregy is different - they invest in whatever is "hot" right now. And quite often they put almost all their money in one company. Give bacteria lactose, they will switch to using lactose, give it glucose, they will re-adjust and eat only glucose.
Now to Nums question, how we model it. Same as I said before - have genes for digesting each food type (we should get three in v.3, right?). Use counters to up-regulate those that are used more frequently. Not a perfect solution, I can probably point out some weak points myself, but a step forward nevertheless.