Single parser for xref+document+etc
replace disparate parsing routines (applied to different pieces of input) with one big HParser that uses h_seek() to move around. this will enable packrat to cache, for instance, the xref tables instead of us parsing them once to resolve references and again as part of the linear parse.