547 plugins love

The idea of this patchset is to make the plugins nicer to use.

the main changes are:

* allows plugins to be dynamically loaded/unloaded especially during testing

* load/unload plugin functions only accept the plugin name no longer classes etc

* plugins code worries about caches etc and reinitializations

* `plugins.reset` removed

* new plugin functions `get_plugin` and  `use_plugin` (for easier tests)

* adds `plugin.plugins_update` (really for internal use)

* test fixups

* code cleanups where possible

* the impact on existing code and usage should be minimal as it mainly cleans up the internals and makes hacks in the tests removable

* `config.environment.load_environment()` has been split between affected and unaffected parts