fix: prevent partial file reads during concurrent downloads (#1548)
* cache file refactoring
* use tmp.pid files, fixes #1544
* small improvement for concurrent put calls in the same process
* improved tmpPath generation
* Cleanup FileCache tmp file name generation
---------
Co-authored-by: Joshua Lochner <26504141+xenova@users.noreply.github.com>