Fix grammar in UnitOfWork documentation
Refactor UnitOfWork::doMerge() based on ORM
port remaining functionality from orm merge() functionality.
Refactor upsert functionality. Split up documentInsertions and documentUpserts.