Pulled write process into a separate thread, and introduced a priority queue to
allow the writer to prioritize command and status messages over song messages.