[BUGFIX] Minor glitches in FileIndex- and MetaDataRepositories

There are two minor issues with the Repositories for file meta
data.
The FileIndexRepository::hasIndexRecord returns false if there
is more than one entry in the database. As a result the file
can be indexed over and over again.

In addition while updating file-meta-data it is possible to
update the uid of an record since it is removed from the wrong
array.

Resolves: #52954
Releases: 6.2
Change-Id: Iee4deaa60933f5fd67a31ac70246bc1226b9007a
Reviewed-on: https://review.typo3.org/24897
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter