documents: add support for documents to create preview documents

These preview documents can then have views created for them to be shown
in the document stacks.

I find the whole thing simpler to just use docments and call create_view()
rather than allowing the documents to create the preview view directly.
This way, the same code gets exercised more rather than duplicate code.
html: add html preview view/document
editor: use html preview for markdown/html files

We still need to add a translation function for markdown so that we can
convert md->html. But that will come soon'ish.