Fix windows build failure.

C89 code is preferable to gcc code; define variables at the start of
blocks.
Performance optimisation with pdf_cache_object/pdf_get_xref_entry

The recent change to holding pdf xrefs in a sparse format has resulted
in a significant decrease in speed (x10). Malc points out that some of
this (2x) can be recovered simply by making pdf_cache_object return the
entry which it found the object in.

This saves us having to immediately call pdf_get_xref_entry again
afterwards.

I am still thinking about ways to try and get the remaining time back.
Remove unnecessary test.

We know i >= 0 as we've already thrown if i < 0 earlier.

Credit to Malc for spotting this.
don't try extracting object number 0

pdfextract_main by default iterates through all objects from number 0
to the size of the document's xref table. Object number 0 is however
always supposed to be free, so pdfextract consistently fails and shows
a slightly confusing warning. Object extraction should by default start
at object 1 in order to prevent this warning.