[XrdCl] Make sure that the fork handler and file timer exist before unregistering objects

This is a problem when integrating with ROOT and triggering the garbage
collector in the library finalizer.