Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c.
Backport of 834c4ec8e4cfc43acf0525e0a4d8c914534f6afd,
217f82d7139fd32f07adbfa92c5fb383d0ade577, and
dc5e75d419893bde33b7e439b59bdf271fc1a3f2 from master.
While Node class has a useful `__str__`, its `__repr__` is not that
useful. Added a `__repr__` that makes use of the current `__str__`.
This is especially useful since the more popular `Q` class inherits
`tree.Node`. Also created new tests that cover most of `Node` class
functionality.