Gianfranco Zola has resigned his role as Watford manager after a run of five successive home defeats.