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.

Closes #4165