Rank of a leftist tree
Returns the rank of the tree. The rank of a tree is formally defined to be the length of its right spine. Empty trees have rank 0.