Add getWorkerTask functions

They provide a way to easily create a task in a worker thread and get a handle to it.

Signed-off-by: Luca Niccoli <lultimouomo@gmail.com>