javascript AVL tree