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
Merge "Fixes bug 1151747: broken XML translation for resource collections"