Gloucester flanker Andy Hazell has announced his retirement from all forms of rugby with immediate effect.