Connectivity among thermal habitats buffers the effects of warm climate on life‐history traits and population dynamics