Allow overriding of the ID attribute in JavaScript API resource URLs.

When computing the URL of a resource, we assumed the object's standard
ID was used to represent that resource in the URL. This isn't always the
case, such as for users and groups.

Resources can now set 'urlIDAttr' to a value representing the attribute
that contains the ID used for the URL.