Tensions from the war in Gaza could help accelerate the move away from planet-warming fossil fuels like oil and gas and toward renewable energy, electric cars and heat pumps — similar to how sharp increases in the price of oil during the 1970s unleashed efforts to conserve fuel, the head of the International Energy Agency said.