Spectroscopy and relaxation dynamics of metastable electronically excited states of iodine in rare gas matrices