Shrinking dinosaurs and the evolution of endothermy in birds