Disorder-induced freezing of dynamical spin fluctuations in underdoped cuprates