Moved the threading class from youtube_dl to a separate module