Convert topo->routes from rbtree to binary tree

Need to have a nested search which is not easy with the
libc rbtree.