Added post-order depth-first traverser
Refactored depth-first traversal

Factored out common code in depth-first traversers to a common base
class.
This will make it easier to implement reverse traversers in the future.
Added relevant test cases to assert that the traversers work.