Bug 705738: Remove action/field references to removed pages.
Bug 705738: Remove action/field references to removed pages.

Previously when cleaning a file mutool would not ascend the hiearchy
for fields to remove references to removed pages from non-terminal
fields. When later marking and sweeping objects starting from the
trailer the non-terminal fields still referenced removed page
objects. Therefore those page objects and all their resources were
retained in the cleaned PDF even though the page objects were no
longer reference in the page tree.

Additionally, mutool did not analyze widget actions to determine if
their destination referenced removed pages. For the same reason as
above they would keep page and resource objects of removed pages in
the cleaned PDF.

This commit adds a pass to remove annotations belonging to removed
pages from non-terminal fields, and remove widget actions if their
destination refers to a removed page. After this commit mutool can
be used to remove pages from the PDF attached to the bug in order
to reduce its size.

ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf