Analysis of the Stability and Hopf Bifurcation of a Three-Dimensional System with Delays