Fix TASK_FAILED/TASK_FINISHED interleaving.
Fix TASK_FAILED/TASK_FINISHED interleaving.

Because wait() and the observer can be running at the same time, it's hard to
say who will finish first.

midonet/mcp,mesosphere/deimos,solidsnack/deimos,solidsnack/deimos,davidbliu/deimos-etcd-mod,midonet/mcp,davidbliu/deimos-etcd-mod,mesosphere/deimos