Quark mass thresholds in QCD thermodynamics