Add XML API and use Accept in the http header

This commit adds XML support to the API. This can be requested with
`?api=xml` or by specifying `Accept: application/xml` (or anything
ending with `/xml` in the http header.

The http form (`?api`) is analyzed *before* the header, though, so it
acts as an override.

As it stands, the form must be submitted and fail before it falls back
to encoding type.

Close #91
Implement empty `?api` form fallback to Accept

Previously, in order to fall back to the Accept field in the header, the
form had to be non-empty and fail, such as `?api=foo`. The fall back can
now be triggered just by using `?api`.