Fixes a serious regression when the argument instead of the instance variable of the same name in the constructure is accessed.
Adds the whitespace character to the grammar constants.
Add abstract base classes for a visitor and its visitable elements.
Implement the visitor pattern on XML nodes

- Extracts the XML writing to a visitor class for extra cleanness of the nodes.
- Add an identity transformer that by default creates a copy of an XML tree, but
  can be overridden to perform transformations.
Make the XmlGrammar event based so that it can be easily subclassed.

- The performance characteristics of the new implementation is identical to the previous one.
- All tests still pass.