Add plugin for plugin management and reloading

Also makes the PLUGIN in consolecommands local (shame on me)
and fixes some bugs in the framework