Add a document describing the content of documents

This gives details of the formats and semantics of fields included in
documents in the content store.

I wrote this partly in an attempt to ensure that I understand the
semantics of this, and partly to get some good documentation around this
for others. There are still some parts of this I'm uncertain about, so
I've marked them with TODO.
I think this paragraph could be simplified to make it easier to understand:

`A document consists of a set key/value pairs. Different key/value pairs are present or required, depending on the context. The three contexts are:`