[#642] Add plugin loading and unloading. This does not fix the singleton issue but is better anyway.