Free entries in the xref form a linked list: terminate it properly when writing the XRef

The last entry must point back to object 0. Previously it was left
unitialized and resulted in "-000000001 00000 f" being written in the
XRef table.
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index a076bb0..b516a0f 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1269,6 +1269,7 @@
       lastFreeEntry = i;
     }
   }
+  getEntry(lastFreeEntry)->offset = 0;
 
   if (writeAllEntries) {
     writer->startSection(0, size);