Fix #116; cache class in ModelFilter

This gives us the performance benefit we want without introducing a bug
or requiring a configuration option.

I am a little concerned that an infinite loop might be possible. The
only way I can think of that happening is if a class overrides `.name`
to provide something other than the class name.