More details of documents, diffs, and diff merging

Details of the structure of the document type and, less, the
relationship between this structure and diff; also the approach we'll
be using to merge diffs.