Thermal: Introduce locking for cdev.thermal_instances list.