Implement dynamic page tree lookups.

No more caching a flattened page tree in doc->page_objs/refs.

No more flattening of page resources, rotation and boxes.

Smart page number lookup by following Parent links.

Naive implementation of insert and delet page that doesn't rebalance the trees.
Requires existing page tree to hook into, cannot be used to create a page tree
from scratch.
Hoist count skipping up to before we recurse.
Remove depth counter from page/resources lookups.

Instead of just relying on a depth count (which can easily be fooled
by poor but valid files) use mark/unmark based schemes for
pdf_lookup_inherited_page_item and pdf_lookup_page_number.
Fix pdf_count_pages_before_kid to cope with /Page with /Count in.