Gauge Invariance of Resummation Schemes: The QCD Partition Function