Mechanistic investigations and spectrokinetic parameter determination during thermoreversible photochromism with degradation: example of application to the triphenylimidazolyl dimer (TPID) system