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.

Part of #4165
Merge pull request #4177 from maxrice/rest-api-xml-issue-4165

API: Add XML generation