add Tree and Tree2Output classes

so you can access the tree structure of the parsed document as nested lists.
the Tree2Output can write back the tree to an Output instance.
nice stuff to query the parse tree