Multithreading redesign to avoid race conditions and streaming errors.
Also added a preventive restart to avoid problems and delays when
starting to play songs.