Refactored ExtensionLoader so that it can preload package.json

So that we can preemptively figure out if the extension is a theme or a
regular extension.