Fix treap insert to correctly track size on duplicates
insert_node now returns (tree, was_inserted) tuple so that the size
counter is only incremented when a new element is actually added.
Previously, inserting a duplicate would incorrectly increment size.