Solitons in Crystalline Processes: Irreversible Thermodynamics of Structural Phase Transitions and Superconductivity