fix rendering issues for JPEGs with XMP/EXIF metadata

This was due to the record type 0xE1 not being handled in jpg_read_header.
Documentation for all the record types was added from source for jhead.
Prevent page breaks in table rows.

Taken from https://github.com/KDAB/phantomjs/commit/5c87852c323c2b4bfd96d00cb11d75d71947837a
Repeat thead and tfoot when table contains page breaks.

Taken from https://github.com/KDAB/phantomjs/commit/2d778f687e78eab092d563b0e75ae303e777d8af
Pass page height through to print context from web frame printer

This fixes issues with page breaks not being inserted.
Improve font kerning

This is the workaround proposed in comment #7 of webkit bug 92363:
https://bugs.webkit.org/show_bug.cgi?id=93263#c7
Table page-break improvements

Bump tables to the next page if we cannot fit the caption, thead
and first cell on the current page. Ideally this should be checking
the height of all cells in the first row in the same manner as is
done in the table section render but as this is more of a nice to
have I've done the minimal amount of work for now.

We now only layout section rows once each section has been positioned
within the table, and only supply head and foot reservation heights
to the appropriate sections.

When re-drawing the thead and tfoot only do so if the rect we are
painting is explicitly before/after the "original" thead/tfoot
rather than simply outside of its boundaries. This prevents issues
with re-drawing a redundant head when bumping tables to the next page.

Re-work the table section row layout code so that it's a bit more
streamlined. Additionally, to cater for cells spanning multiple rows
we avoid page breaks in the middle of their content. Note that rows
are always bumped to the next page even if their content doesn't
fit on a full page so as to avoid daft situtations like having the
first 1px on the preceeding page.
Ensure we have a first cell to measure when checking required table height
Handle page break edge case with exactly fitting last table row

In the case where the last table row on a page fitted exactly no
extra offset was afforded to the next row. This resulted in no
space being left for the painting of the table header on the next
page.
Fix segfault when checking heights for pagination if table body does not have a cell at 0,0
fix rendering issues due to incorrect page height computation

This was adapted from the following change in PhantomJS:
https://github.com/ariya/phantomjs/commit/24a9665c4d9d3e2690599e60b8699af679a45c2d
implement "page-break-inside: avoid" for non-floating block elements

This patch is taken from https://bugs.webkit.org/show_bug.cgi?id=5097#c17
enable WOFF file support

The following commits were ported from PhantomJS:

https://github.com/ariya/phantomjs/commit/04b74f99fd2b353225db44b1097ed3cc8d683a5c
https://github.com/Vitallium/phantomjs/commit/b1d06f92ea759ab1535121f13a582070d8b658a5
add support for CSS widows and orphans

ported from the following commits in Webkit:
http://trac.webkit.org/changeset/141009
http://trac.webkit.org/changeset/137200
http://trac.webkit.org/changeset/123904
http://trac.webkit.org/changeset/123684
avoid crashing when parsing some weird HTML Table constructs