g factors as a probe of correlated changes of the nuclear deformation and pair field in ground-state rotational bands