GrepFindFilesThread: don't access globals in a non-main thread

As the now-removed comment stated, obtaining a project's file set from
a non-main thread is not thread-safe.
Let us collect all the necessary file sets once in the main thread, then
use them in the worker thread.
1 job for !144 with make-grepview-thread-safe in 6 minutes (queued for 117 minutes and 47 seconds)
detached
Status Job ID Name Coverage
  Build
failed #72923
linux kf5-qt5 qt5.12

00:06:00

 
Name Stage Failure
failed
linux kf5-qt5 qt5.12 Build
    return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib64/python3.8/urllib/request.py", line 1353, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Uploading artifacts for failed job
Uploading artifacts...
WARNING: JUnitTestResults.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1