Thermodynamics of metastable processes in the magnetization of type-I superconductors