Merge pull request #9033 from leoetlino/scan-thread IOS/USB: Move scan thread logic into a separate class