TextOutputDev: Set text matrix when painting selection

https://bugs.freedesktop.org/show_bug.cgi?id=61042
glib: Always start from the beginning when starting a new search on a page

And start from previous match when searching the next one on the same
page. This allows to search for the same string multiple times on the
same page.

https://bugs.freedesktop.org/show_bug.cgi?id=59972
Only write the file once when saving

Bug #62739
Be pedantic about setjmp use

Bug #63067
Add a GooFile class to encapsulate file read access using offsets

Bug #62735
Make our mutexes recursive

Fixes a deadlock problem found with a pdf i can't share (411klaralv.pdf)
Reviewed by Thomas and Adam on the mailing list
Pass the recursion flag
No need to keep the mutex attributes around all the time
implement Crypt filter

Bug #62800
Add missing free()
Fix for complete rewrites in repaired files

Part 2 of bug #62985
if You save a PDF with defect xref offsets, the

readXRefUntil(-1 /* read all xref sections */, &xrefStreamObjNums)

in XRef::scanSpecialFlags() will destroy the already reconstructed entries table, but this means that any modification which the user did in the meantime get lost. This can be tested i.e. with bug168518.pdf.
Merge remote-tracking branch 'origin/poppler-0.22'
Last commit was Thomas' forgot his (C)
Fix endstream detection

Part 1 of bug #62985

the endstream search, and at least with bug-poppler16579.pdf this doesn't work correctly: the shift(-1) with the used token mechanism in Lexer isn't correct for a binary data stream. If there is i.e. a "(" without corresponding ")" in the binary data, which of course can happen and happens in that pdf, shift(-1) skips the searched endstream and can therefore in worst case reach the end-of-file. Therefore I implemented a shift("endstream") in Java, which I now port back to C++, or in other words "There and Back Again" :-)

You can test it with bug-poppler16579.pdf if You just change temporary

          if (longNumber <= INT_MAX && longNumber >= INT_MIN && *end_ptr == '\0') {

in XRef.cc to

          if (gFalse && longNumber <= INT_MAX && longNumber >= INT_MIN && *end_ptr == '\0') {
Merge remote-tracking branch 'origin/poppler-0.22'
Fix crash in KDE bug #317710

It is not guaranteed that the ::LinkAction passed to PageData::convertLinkActionToLink
will be always around (e.g. Page::action deletes it) so make a copy of the ::MediaRendition object
Merge remote-tracking branch 'origin/poppler-0.22'