[FEATURE] Find best-matching local storage instead of default-storage

If no storage-UID is given usually the default-storage will be
used ("legacy-storage"). Some problems with not up-to-date
index-records etc. can be prevented by using a matching storage
instead of falling back to the default-storage (ID 0).

Implement search for best matching storage.

Resolves: #45498
Releases: 6.2
Change-Id: Ife00d68314fe43804227bb26280d0d475cbaf10b
Reviewed-on: https://review.typo3.org/18290
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf