Update mergeDirtyInserts algorithm, few bug fixes, test all merge scenarios, start sync error testing