Application of the thermodynamic extremal principle to diffusion-controlled phase transformations in Fe-C-X alloys: Modeling and applications