Seperated the Traverser from the Output generation.

The Traverser now simply walks through a document. The OutputRules convert
the nodes into output html. The rules is a configurable options. By default
OutputRules will generate html close to the html5 that was parsed. Alternate
rule implementation (e.g., minify rules, pretty spacing rules) can be set
as the default or on an individual case.
Fixed cdata and text handling.

wholeText on a text node holds the text of logically adjacent text. That means a new line followed by cdata following by spaces and/or a new line will all be in the cdata wholeText. This change fixes our handling to use data rather than wholeText.

Also fixed the cdata regex tests.
Added some rule documentation.
Added an interface for Output Rules to document how they work.
Handling in the traverser the case where the dom passed in is a node list.