Thermodynamics of the quantum sine-Gordon model with finite winding number