Thermodynamics of the dissipative two-state system: a Bethe Ansatz study