Nonlinear dynamical control of the giant resonant Goos–Hanchen shift