Cache xref stream content

It increases memory usage, but otherwise PDF documents
with xref streams are processed too slowly