[BUGFIX] Cache file could not be written on concurrent actions

The hook to clear the language (l10n) caches is currently called
every time any element in the backend is modified. If concurrent
actions take place, flushing and regenerating this cache results
in an accordant exception like

The cache file ".../t3lib_l10n/3e2cbbda0301cf592e5831ef26c56b7b"
could not be written.

The solution is to only execute this hook if all or the temp.
caches shall be cleared

Change-Id: Iaf68f50e2f9bfcc3ffce64a0f5267673afd332ad
Fixes: #46205
Releases: 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/19898
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-on: https://review.typo3.org/19903
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[BUGFIX] Empty clear cache command logged

If e.g. enabling/disabling a record in the backend, an
additional empty clear cache command is logged, like
"User admin has cleared the cache (cacheCmd=)".

Change-Id: Ie7b6ee47c9e53c7ba399aada1f738fe700574e89
Fixes: #47181
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/19905
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn