Modelling the nutritional ecology of ungulate herbivores: evolution of body size and competitive interactions