C++ template implementation of AVL tree with no recursion in either insert or delete