Astronomy meets QCD: cooling constraints for the theories of internal structure of compact objects