Long-distance gene flow and adaptation of forest trees to rapid climate change