Molecular thermodynamics of solutions in the normal and critical regions — I. Theory