better deferred coroutine implementation. more tests for twisted integration