Pass database connection to plugins, instead of database engine. (Revert 788108f315e4441255196629c835271a8d35987c)