Breadth first tree iterator