Unregister tool factories
For example, if a tool is defined in a plugin, it is registered twice
because every plugin is loaded, unloaded, and then loaded again at
application startup. Hence we must ensure that the factories are
explicitly unregistered when a module or plugin is unloaded.