Integrable structure of conformal field theory, quantum KdV theory and Thermodynamic Bethe Ansatz