Thermal conductivity across the phase diagram of cuprates: Low-energy quasiparticles and doping dependence of the superconducting gap