core: keep track of plugins in plugin manager directly

It simplifies things to keep the plugin in the manager in addition to keeping
in in each instance. Plus it gives us the option of loading a plugin without
creating an instance.
core: only create protocol instance when creating owner
jabber: work around thread race in gloox when having multiple owners
core: use std::find/find_if instead of for-loop