add reroot function to nxtree, needed by new outgroup logic, and fix breadthfirsttraversal