[TASK] Optimize clearing file backend caches

During concurrent requests it might happen that one request
flushes a cache that is stored in the filesystem and another
different request tries to recreate the data. This will lead
to race conditions if the cached contents are large.

The idea is to move the current cache to a temporary location
and then remove it.

Change-Id: I242fdbc6ab28008363747a8076d021ebce127e17
Resolves: #43382
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/16833
Reviewed-by: Mattias Nilsson
Tested-by: Mattias Nilsson
Reviewed-by: Philipp Gampe
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[TASK] Replace static calls to FlashMessageQueue to the new service

Change-Id: I2f7c470ba0aa6086989b5bd38be1f9cfdcc77650
Resolves: #46607
Related: #44593
Releases: 6.1
Reviewed-on: https://review.typo3.org/19227
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn