playlist: Quit worker if stream disappears
playlist: Use hashlib instead of md5
playlist: Refactor run_if_locking and add tests