Obtains all keys in the tree in a sorted order, either forwards or backwards.
The keys can be put in any container or class that implements the IVariantAddable interface.
Because by nature AVL trees are sorted then this function requires zero effort to sort.