Control optimization and homoclinic bifurcation of a prey–predator model with ratio-dependent