Implement waitCancelTimeout for STM version of async.

A missing STM function with tests for this function. Having this function allowes to switch from Chan based to STM based workers everywhere.