Spin relaxation and the Kondo effect in transition metal dichalcogenide monolayers