add whole document serialization via toString(whole=true, compressed=true)

This makes it possible to serialize the **whole** document/subtree as a usable valid XML string.

```javascript
doc.toString() // -> as before, trimmed and indented
doc.toString(true) // -> untrimmed and indented
doc.toString(true, true) // -> untrimmed and unindented
doc.toString(false, true) // -> trimmed and unindented
```