Optimize UniXXX CMap files.

Split common parts into separate CMap files and include them with usecmap.

This reduces the size of the compiled in CMap resources from 3Mb to 2Mb.
Add cmap cleaning scripts.

One to write a CMap out in expanded form ready for text processing tools.
Another to write a CMap out as compactly as possible.

The output is not in proper CMap format and can only be parsed by MuPDF.
Fix 695156: Display metadata with SetDlgItemTextW.

Convert from UTF-8 to UCS-2 to display unicode text properly.
prevent indeterminacy by uninitialized variables

There are two issues where variables may be used unitialized:

* extract_exif_resolution fails to set xres and yres for JPEG images if
  there's no valid resolution unit (mainly affects XPS documents)

* xps_measure_font_glyph uses hadv and vadv unitialized if the glyph id
  isn't valid (i.e. if FT_Get_Advance fails)
correctly bound image mask clippings in bbox device

Same as for fz_bbox_fill_image_mask, fz_bbox_clip_image_mask must
transform the unit rectangle to get the bounding bbox.
better buffer underflow protection for ba15a8cd3238a3a3c098ad8b7d96cb0e405fc26f
Fix signedness in cmap interface.
Use code space ranges when remapping ToUnicode CMaps.
Fix 695101 and 694114: Use the correct numbers to validate the encryption key length.

This reverts commit b1ed116091b790223a976eca2381da2875341e10.

The key length for V==2 must be 40 <= length <= 128.
The key length for V==4 is not taken from the /Length entry.
Make unresolvable link destinations warnings instead of errors.

See bug 693314 (file Z23-04.pdf) for an example file.
Fix 694952: Limit Type 3 font glyph bbox size.

Don't let a glyph's bbox be too much bigger than the font bbox.
Add an application agnostic memory handler for libjpeg

This adds a custom memory management layer between libjpeg and the calling
app - in such a way that the code can be shared between mupdf and
Ghostscript/PDL.
Remove jmorecfg.h from includes.
Build libcurl as part of the 'make third' rule...

...without adding it to the standard list of required third party
dependencies.
Load the usecmap directives recursively for builtin CMaps.

Fixes bug introduced in commit 1679c1e7a89ae62260fd84ce55c6bef376c6e6ba:

    Optimize UniXXX CMap files.
Fix 695247: Use exponential realloc pattern and qsort for huge paths.

Grow the edge list using an exponential realloc pattern.
Use qsort for huge paths and only fall back to the simple
shell sort for small paths.
Fix 695222: Treat non-breaking space (U+00A0) as white space for search.
Fix windows VS builds.

Fix broken solution file and add project entries for new files.
Flush pending text on a change of CTM.

Without this, comparefiles/Bug695086 renders the barcode test upside
down.
Bug 695183: Inflate large buffers at a time for speed.

When I changed the stream implementations to use implementation
specific buffers, rather than a generic public one in every fz_stream,
I changed fz_read_byte to only get a single byte at a time.

I noted at the time that the underlying stream was free to decode
larger blocks if it wanted too, but I forgot to actually do this for
the flate decoder. Fixing this here should solve the speed issues.