Add the ID with an array of two md5 hex digests to the trailer per PDF
specification sections 3.4.4 and 10.3
Add a four byte binary comment to head of PDF per the note in section
3.4.1 (file header) if the file is compressed.
correctly calculate the startxref value, which is the offset to the
start of the (last) xref table, per section 3.4.4
Fix the offsets as generated for the objects so the xref table now
contains correct offsets.
Merge pull request #12 from tjoneslo/xref-table

Xref table fixes