Ticket 48872 - Fix segfault and use after free in plugin shutdown
Bug Description: Plugin_closeall would free the plugin password name scheme
value *even* if the plugin was not a password scheme.
backend manager would call be_cleanup on the plugin *after* plugin_closeall was
run. This means plugin_closeall now does not close backends, and we call
plugin_free from the backend to do this.
Fix Description: Check the union type to make sure we free the pwdscheme
only on password plugins.
Expose plugin_free, and call it from the backend manager. Don't close backends
during the call to plugin_closeall.
https://fedorahosted.org/389/ticket/48872
Author: wibrown
Review by: mreynolds (Thanks!)