doctype, xml header, cleaning, fixes

* Added optional `DOCTYPE` declaration
* Added optional `standalone` attribute on XML header
* Merged in the fix for options.escape
* Fixed the escaping of non-String values
* Fixed the behaviour for falsy `value` and `text` definitions
* I added prettyPrinting (not perfect, yet, but easy for debugging)
* I changed the string concatenation to an array push and later join
* I cleaned up the code a bit (switch statement, makeNode method, etc.)

Have a look and let me know if you can pull this in or if there is still something to do!