improved avlitree support for inline use

Added a root structure for AVL index trees, making them easier to use as an
inline data structure. Also updated the AVL joint tree root function to use
the newer empty format for creation
removed debugging code

Removed code accidentally left in from debugging.