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.
1 file changed