Based on the discussion in http://firstname.lastname@example.org/msg00127.html
this is a merge of two patches:
The first one changed the code to use only the native avl-tree
functions, the second one used a compatibility shim to make newer
versions of emacs think they were running with elib. I turned that
around so that older versions of emacs think they're using the newer
code, which will make it easier to remove the shim when we no longer
need backward compatibility.