Implement avl_union

This PR adds the `avl_union` function and it's implementation.
The actual argument documentation goes into the interface definition, not the implementation!