When we check whether the dependencies for a task have already been
evaluated and then accordingly move the task from waiting to queued, we
do not remove it from the reverse dependency lists it appears in.
The task result state now distinguishes created/waiting/queued, which is
useful for debugging. mt_task_queue now also correctly waits for all
tasks during destruction.