use tandem for communication

This removes the separate worker thread and instead uses tandem for
caller coordination.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>