Rewrite merge_rev_trees to handle new merge output
Rewrite merge_rev_trees to handle new merge output

This commit adds a complete rewrite of couch_db_updater:merge_rev_trees
to support the new couch_key_tree:merge output. Since
couch_key_tree:merge now returns the position of the merged path in the
tree, merge_rev_trees can explicitly check if a document is being
recreated and behave accordingly.

BugzID: 25150

ngpestelos/couchdb-couch,smithsz/couchdb-couch,KlausTrainer/couchdb-couch,smithsz/couchdb-couch,cloudant/couchdb-couch,fkaempfer/couchdb,ngpestelos/couchdb-couch,apache/couchdb-couch,alanning/couchdb-couch,apache/couchdb-couch,alanning/couchdb-couch,ngpestelos/couchdb-couch,smithsz/couchdb-couch,fkaempfer/couchdb,cloudant/couchdb-couch,fkaempfer/couchdb,fkaempfer/couchdb,KlausTrainer/couchdb-couch,apache/couchdb-couch,cloudant/couchdb-couch,KlausTrainer/couchdb-couch,alanning/couchdb-couch,fkaempfer/couchdb,fkaempfer/couchdb