finish plugins_unload_xxx and unload_plugin