[BUGFIX] Update $GLOBALS['TYPO3_LOADED_EXT'] on package change

If a package is (un)installed we need to update
$GLOBALS['TYPO3_LOADED_EXT']. ExtensionManagementUtility depends on
the actuality of this array.

Resolves: #56978
Releases: 6.2
Change-Id: I969b84a624a6a9f74b87fdd85b9c4c3a7b49750a
Reviewed-on: https://review.typo3.org/28459
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers