External sessionmaker passed to plugin

Now passes the external sessionmaker to the plugin, to agree with last update.

"One sessionmaker instance per application."