plugins unregister all services and events when being unloaded