Tuning the Thermal Relaxation of a Photochromic Dye in Functionalized Mesoporous Silica