Honor toJSON/toXML() for XML support

/to @ritch @bajtos 

The PR allows customization of JSON to XML conversion using toJSON()/toXML(). It also adds some test cases for XML media types.
Nitpick: `format` is not used anywhere else, in can be inlined.

```js
accepts = this.req.query._format.toLowerCase();
```