Successive governments have failed to prepare the UK for extreme heat, the climate watchdog says.