FIX: race condition in FileProcessor (leading to occasional seg fault)
Merge pull request #101 from reneme/fix_race_cond

FIX: Race Condition in FileProcessor

Due to a race condition the FileProcessor occasionally produced a heap corruption, leading to a segmentation fault while publishing a repository.

After a PendingFile is successfully processed and uploaded, the worker thread pushes it into a garbage queue for later deletion. Following this push operation the PendingFile was unlocked by a LockGuard running out of scope.
The race condition occurred, when the garbage queue was emptied by another thread BEFORE this unlock has happened, resulting in a heap corruption when unlocking the already destroyed mutex.