Fix: task isn't removed from zk when failure hanppens

Persisting the old taskId but not the new one when handling failed task
causes the problem.
Merge pull request #309 from depay/master

Fix: task isn't removed from zk when failure hanppens