add LazyAttachmentDoc and tests

to be used in app manager for building apps
or any situation where you want to make changes
to a doc interspersed with adding attachments
and then finally save it once
at which point the doc is first saved
and then the attachments are put to the doc