[CM] Set local certificates model.
[Core] Slight code style fixes in PluginTreeBuilder.
[Core] Manually keep track if the plugin is loaded.

QPluginLoader provides slightly different semantics.

Fixes #1801.