Fix of hanging threads belonging to the Scanner

Saw both that Plex wasn't responding randomly during a reboot of the QNAP NAS, so I added a small 3 sec. delay, but worse, saw the media scanner wasn't killed during a shutdown of Plex, so added a fix for that as well

/Tommy