Energy demand for training machines and running apps is driving a surge of investment into fossil fuels