Allow subclassing

We have cached models that are subclassed. This is sort of a weird pattern, but somebody else out there might be doing the same thing, and this should help them.

If an update happens on the subclassed record, we need to expire the parent's cache.

e.g. There is a User model, that is record-cache enabled. There is also a SpecialUser model defined as follows. There is no caching on SpecialUser.

    class SpecialUser < User

Without the changes in this pull request, saves on SpecialUser will not clear the cache for the corresponding record in User, which is a problem.