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"