Improve serialization and parent URL computation for webapi.

It was difficult in the past to override serialization of objects in
payloads, but there are times when you really want this.

Now, instead of directly looking up a serializer from the global
registry for a given object, we go through a function on the resource
itself. This defaults to looking up in the registry, but the resource
can override this in order to override any object it chooses that would
be represented in its payload.

Likewise, sometimes a resource needs to override the parent URL
computation for an object. It could already do this before, but it
didn't have access to all the variables that made up the URL. We now
pass **kwargs, like we do with most other similar functions.