Allow couchbeam_doc:extend/2 to merge 2 documents.

Convenient when merging for example an incoming JSON request into a document.