Audio_output: can initialize a thread that does nothing

This involved minor thread refactoring and cleanup.