Cooling systems for borehole tools