Define methods allowing to use Deferred inside the thread.

* call_async() returns a Deferred as a handle,
* which can be later used in wait_for_defer() call to actually yield the result