Clean up content stream code
The content stream, page tree processing, and text extraction code went in with insufficient review. This ticket is about performing that more thoroughly after the fact and cleaning up. Some issues:
- Indentation is a mess. Style is one tab character for blocks, four spaces for line continuations.
- Style in general. Rest of the code essentially follows OpenBSD kernel style(9).
- Diagnostics printed to stdout. Standard output is for expected program output only.
- Missing validation in various places.
- Shotgun-style parsing.
- Code duplication.
- ...