These changes work around a thread safety issue in our rmtree
implementation, which uses chdir to traverse the directory tree.
Using chdir resolves issues deleting paths longer than PATH_MAX, but
makes the code inherently unsafe in a threaded environment.
Now, the main rmtree function uses fork to perform the actions in a
dedicated process.
To avoid possible locking issues with the logging module, we introduce a
simple proxy logger for the subprocess.
Fixes: https://pagure.io/koji/issue/3755
For historical context see:
https://pagure.io/koji/issue/201https://pagure.io/koji/issue/2481https://pagure.io/koji/issue/2714