Better plugin state save behaviour

So that saving the state does not reload a plugin that's already loaded,
and doesn't need a plugin to be loaded to save it as disabled.