avl_tree: Optimize swapping node for removal