Function pruneLinkedDocumentsToReferences

Recursively reduces nested named nodes (objects with @idrootEntityIRI) to reference objects { "@id": "..." } so linked documents are not carried as expanded graphs.