Refactor outline repair code.
Refactor outline repair code.

This refactoring makes it possible to add begin/end operation
calls as well as repair bad /Prev points in future commits.

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