Particle-number-projected thermal pairing