Scaling between the rotational diffusion of tracers and the relaxation of polymers and glass formers