Add listener and event handler registration (close #130)

This introduces registerListener and registerEventHandler to the support
code helper. Those two methods let clients register custom listeners for
AST events.

Relates to #91.
Typo