PluginManager: returning plugin instance via std::unique_ptr.

Avoids accidental leaks -- I forgot to delete static plugin in test.
examples: updated pluginmanager example.