Simplied treap union() code.