Statistical Thermodynamics of the Transition Region between Two Phases. I. Thermodynamics and Quasi-thermodynamics