Fixes bug 1151747: broken XML translation for resource collections

Special-case "links" when converting a collection from JSON to XML and
vice versa.

Change-Id: I7ab1f50c1da3ec389930c1bf45d498551c4cf954
xml_body returns backtrace on XMLSyntaxError

Protected against XMLSyntaxError that can occur in from_xml.  Return
a validation error (400) instead of an internal server error (500).

Change-Id: Ic5160f4f6c810e96b74dbf9563547ac739a54c5e
Fixes: bug #1101043
Merge "Fixes bug 1151747: broken XML translation for resource collections"
Merge "xml_body returns backtrace on XMLSyntaxError"
extracting user and trust ids into normalized fields

These fields are used for queries, and may need to be indexed
Also moves the delete token for... functions into the base class
for controllers.

Removed the token API revoke token call as that needed access to other
APIs.  Logic was moved into the controller.

Bug 1152801

Change-Id: I59c360fe5aef905dfa30cb55ee54ff1fbe64dc58
Discard null endpoints (bug 1152632)

If a v2 client passed {..., "adminurl": null, ...} in a endpoint-create
request, then the null value was being persisted on an endpoint with a
different interface value (i.e. a publicly facing endpoint would have an
"adminurl": null value inexplicably attached to it.)

This change simply pops null urls from the endpoint and discards them.

Change-Id: Idd0964b6ec34fbc8b979253d32f655ea9797f259
Merge "Discard null endpoints (bug 1152632)"