Fixes some crashes caused by thread conflicts.

Problem: app crashes from time to time. Debug has shown
that one of these crashes occurred during access to the
queue in SerialPortWorker.
Reason: access conflict.
Fix: Use QReadWriteLock.
Move music pause/unpause to the dancing() method.