Rewrite PulseAudio backend into a threaded class