C++/TreeDumper: Add infix order traverse with O(1) space