Herbivory and climate as drivers of plant population and range dynamics