Extreme heat is not only making cities less livable; it is also reshaping who can afford to live where.