extensionSystem: Fix extension reloading
Unloading an extension has become an async operation, but we aren't awaiting the result. That means that we recreate the extension object before we remove the "old" extension object from the map, with the effect that the reloaded extension is removed completely.
Fixes #6507 (closed)