Dynamics of starvation and recovery predict extinction risk and both Damuth’s law and Cope’s rule