Thermodynamic Equilibrium of Heterogeneous and Distributed Components of Complex System as Basis of Effective Control and Management