Add subclass matching to serializer field mapping.

First attempt at #1809.
I'm all for functional! Don't know how ingrained that style is in the general Python community, though. Traditional pythonic style seems to prefer vertical layouts to one-liners, but I'm not sure where it's headed.