Why hot things get bigger: thermometers and thermostats explained