Metadata and base64 encoding support.

Along with page content, there's other information we need to persist,
such as page tags and the metadata blob.  This commit adds support for
serializing those elements into a header portion in the output page.

In addition, for non-text pages, the contents are now written out base64
encoded.  This allows me to get the binary data serialized alongside the
metadata portion.