moveChildBefore

fun moveChildBefore(child: T, reference: T)

Detaches child from its current parent, if any, and inserts it immediately before reference in this node's children, preserving both size dimensions on both parents -- the same tombstone-aware detach moveChild does, but inserting before a specific sibling instead of appending. Used by CrdtTreeNode.split's §7.4 empty sibling re-parenting so a tombstoned split re-parent makes no live- size change (port e41069df's moveChildBefore, yorkie-js-sdk#1360, tree.ts:730).

A no-op when child and reference are the same node (JS parity, index_tree.ts moveChildBefore at v0.7.23). Otherwise throws NoSuchElementException when reference is not a child of this node -- validated BEFORE child is detached from its old parent, so a missing reference never leaves child detached-but-unattached (this node and child's old parent both untouched).