Drops objects from a merge's in-progress target
COSDocument that turn out
unreachable from its trailer's
/Root (and
/Info/
/Encrypt, if
present) once all cloning is done.
COSObjectImporter clones everything transitively reachable from whatever it's
asked to import -- including, for a structure element's /Pg back-reference, an
entire other page (with all of that page's own resources and annotations)
when some selected page's structure subtree happens to reference it, even though that
other page was never itself selected for the merge. StructureTreeMerger.finish()'s
own pruning already removes such references from the structure tree's /K
arrays, but the objects it cloned along the way stay registered in the target document
until this sweep runs -- left in place, they'd bloat the output file and leave behind
dangling, never-renumbered /StructParents//StructParent integers of
their own, which is exactly what a PDF/UA validator flags as an inconsistent entry in
the merged structural parent tree.