Derivation and thermodynamics of a lattice Boltzmann model with soluble amphiphilic surfactant.