Prevent stack overflow/loop in task engine for cyclic tasks.
Add API for getting debug information from the task engine.
Fixed nested resolve tasks.