XrdCl: Make sure that the plug-in factory is deleted before the plug-in library is unloaded