Nearly 50,000 New York residents lose power as heat wave grips the city