fix recent regressions

* at one place, code returns from inside an fz_try which borks up the
error stack

* pdf_load_xref wrongly assumes that at least one non-empty xref has
been read if there were no errors thrown during parsing

* pdf_repair_xref skips integers when object numbers are out of range
Free fz_context at end of win32 app
Update gitignore to account for the shuffle
Update annotation handling in preparation for incremental update

When incremental update is in place, functions that alter one structure may
have the side-effect of altering another: i.e., updating an annotation may
require the Annots array or even the page to be cloned. This commit makes
the existing annotation code hardy to this eventuallity. It also cleans up
a slight mess of the past where not all annotation-altering functions had
access to the pdf_annot struture, instead having to work with just the
pdf object.
Shrink pdf_obj type by using a flags word, and moving refs to a short.

'marked' moves into the flags word. 'kind' becomes an unsigned char.
'sorted' moves from in the dictionary specific bit of the object into
the flags word. This should shrink us by 8 bytes.
Update pdf_obj's to have a pdf_document field.

Remove the fz_context field to avoid the structure growing.
Rid the world of "pdf_document *xref".

For historical reasons lots of the code uses "xref" when talking about
a pdf document. Now pdf_xref is a separate type this has become
confusing, so replace 'xref' with 'doc' for clarity.
Update ios project for reshuffle.
Fix potential memory leak
Ensure that xref_sections always grow over time.

Never allow a new xref_section to be smaller than a previous
one, as this makes pdf_xref_len(xref) get unexpectedly
smaller.
Rework storing internal flags in PDF objects.

Before we render a page we need to evaluate whether we need
transparency or not. To establish this, we recursively walk the
resources looking for certain markers (blend modes, alpha levels,
smasks etc). To avoid doing this repeatedly we'd like to stash
the results somewhere.

Currently we write a '.useBM' entry into the top level dictionary
object, but with the recent changes to support incremental update
this is not ideal - it has the effect of forcing all resources
into the new section of the xref.

So we avoid that horrible hack and use a different one; we make use
of the new flags word in the pdf_obj structure. 1 bit is used to
indicate whether we have stashed a (boolean) value here, and another
bit is used to indicate what that value was.
Silence compiler warnings.