Update jbig2dec thirdparty to latest.
Change to Affero license.
Fix whitespace.
Bug 693639: Use strlcpy instead of strncpy!

strncpy is *not* the correct function to use. It does not null terminate,
and it needlessly zeroes past the end. It was designed for fixed length
database records, not strings. Use fz_strlcpy and strlcat instead.
Bug 693639: fix potential NULL pointer dereference in base_context.c

Thanks to zeniko.
Bug 693639: fix incomplete error handling in null device.

Thanks to zeniko.
Bug 693639: don't take references on global (static) resource objects.

Thanks to zeniko.
Bug 693639: fix integer overflow in image_tiff.c

Thanks to zeniko.
Bug 693639: plug various memory leaks.

Thanks to zeniko.

Also ensure that pdf_free_annot copes with NULL.
Bug 693639: bring fitz.h in line with source use of restrict keyword.

Thanks to zeniko.
Bug 693639: fix warnings.

Thanks to zeniko.
Bug 693639: allow OpenXPS extension and XML namespaces.

Thanks to zeniko.
Bug 693639: fix overflow due to wrong type of intermediate variable.

Thanks to zeniko.
Bug 693639: fix typo in ps calculator.

Thanks to zeniko.
Bug 693639: treat NULL scissor in display list as infinite rect.

Thanks to zeniko.
Bug 693639: be even more NULL in pdf_js_none.c

Thanks to zeniko.
Bug 693639: some convenience functions.

Added primarily for use by SumatraPDF.

Thanks to zeniko.
Bug 693639: fix UTF-8 BOM detection.

A UTF-8 BOM followed by a UTF-16 BOM would treat the data as UTF-16 rather
than UTF-8. Clean up the BOM detection logic.

Thanks to zeniko.
Bug 693639: Avoid heap overflow and leaks in error cases.

Avoid heap overflow in the error case in fz_end_tile.

Avoid leaking all previously loaded annotations from pdf_load_annots
if pdf_is_dict throws an exception.

Various whitespace fixes.

Many thanks to zeniko.
Add fz_get_annot_type