The Demography of Adaptation to Climate Change