Phylogeny, ecology, and the origins of climate-richness relationships