[BUGFIX] Too many tags by identifier in CacheBackends

This patch is a backport of 3d93017022a8ef03842d75f2d7bd3912365c95be.

Applies to Apc/Memcached backends.

After an array_merge the values aren't unique. This leads to duplicate
tags per identifier. This patch changes that and also moves the
findTagsByIdentifier call out of the foreach loop.

Resolves: #62513
Releases: 4.5
Change-Id: Ia4713eeb399a4770b2c23e5738e076a91afe2a64
Reviewed-on: http://review.typo3.org/33592
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Michael Stucki <michael.stucki@typo3.org>
Tested-by: Michael Stucki <michael.stucki@typo3.org>