[BUGFIX] Fix loading order for extensions

Stick to the documented loading order of extensions.
That means following this order: sysext, global, local, composer

The same extension found in the latter will be loaded instead of
the former. Also adjust the Dependency resolver accordingly for the
edge-case of overwriting sysexts.

Resolves: #59147
Releases: 6.3, 6.2
Change-Id: I50c7849e32b309a28f792340f3ff892e516dadb8
Reviewed-on: https://review.typo3.org/31021
Reviewed-by: Markus Klein
Tested-by: Markus Klein