OpenRefine/OpenRefine — pull request #644 by ldmosquera (2012-12-10 11:33:47+00:00)
Title: Don't create a new FileCleaningTracker per upload

Minor improvement for most cases, but fixes a serious leak in certain corner cases.

In ImportingUtilities.retrieveContentFromPostRequest(), one new FileFactory +
associated new FileCleaningTracker was being created per each new file upload.

FileCleaningTracker is intended to handle many temporary files and not just one.
For this, it creates a queue and a "File Reaper" thread that watches files.
So now, instead of creating one per upload, we just create a static, global
FileFactory + associated FileCleaningTracker; all uploads will create temporary
files out of this single file factory, which will have just one
FileCleaningTracker.

NOTE: in some situations (ie. when you delete a project before temporary files
have a chance of being automatically removed), FileCleaningTracker isn't
properly garbage collected and thus its thread is never shut down, leading to
leaks.