when merging, also copy structure between the documents
percolating wrapper nodes up wasn't quite right, fixes c7aa0c606a6a0fbb9d0fb3d10bbca1ddb700fec8
refactor
when merging, content inserted/deleted at the very end of the document could not be merged into the other document because the last offset tuple might have already been popped
when percolating wrapper nodes up the tree don't stop at inline elements because when merging it is important to merge as much structure as possible so things like paragraph boundaries dont get lost