document.hpp: support creating a document directly from a document_reader object