[TASK] optimize writing to cachequeue for speed

New Relic revealed that trying to prevent duplicate paths in
tx_purge_cachequeue has quite a performance impact on the SQL server.

Now the cachequeue is just written and the logic to remove duplicates
was moved to getAndRemovePathsInCacheQueue.

Change-Id: I3f8fc39b3db31ba6db9ee75768c988f22331cc7c
Reviewed-on: https://review.typo3.org/26286
Reviewed-by: Christian Zenker
Tested-by: Christian Zenker