Remove redundant branches

These used to result in better codegen for unknown reasons, but this is no
longer the case.
Use impl::get_document instead of root() where possible

This reduces the number of unsafe pointer manipulations.
Fix xml_node::offset_debug for corner cases

Computed offsets for documents with nodes that were added using append_buffer
or newly appended nodes without name/value information were invalid.
Ensure selected page size works with allocate_string

Previously setting a large page size (i.e. 1M) would cause dynamic string
allocation to assert spuriously. A page size of 64K guarantees that all
offsets fit into 16 bits.