Fixes and performance improvements to the extension system
Just some fixes and performance improvements I found in the extension system while looking into #177 (closed).
I'd also like to completely remove the INITIALIZED ExtensionState, its pretty confusing as it gets assigned to extensions that didn't get initialized (using
initExtension()) and doesn't seem to be needed anymore.
Closes #177 (closed)