Hopf and zero-Hopf bifurcations in the Hindmarsh–Rose system