Ensure that OT replacements are done in order
Ensure that OT replacements are done in order

Previously, we were relying on key ordering to ensure that a delete was
done before an insert in a replace. If they key ordering is wrong for
whatever reason, we end up doing a no-op (insert then delete).

Instead, check specifically for replace components and do the delete
before the insert, regardless of JavaScript object key ordering.

usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2