API: Add XML generation

This commit completes the XML response handler and adjusts the output format for all resources to include a top-level property that encloses the response. This is more consistent with the multi-resource (e.g. GET /orders) response and is required for XML responses.

I'm not 100% crazy about the implementation, but the structural format of XML differs in some key ways from JSON, so it makes it fairly difficult to maintain the same array format that's properly suited to both output formats. Since I think JSON will be the primary way clients will consume the API, the responses are optimized for that. Because of that, there are some adjustments made to the response format within the XML class.

Closes #4165