Add an api for customising how verifying doubles are checked

This is a prerequisite for rspec/rspec-rails#1238
I think `const` is the wrong name for this method.  `@object` my have a constant reference to it and there's no guarantee that `@object.class` has been assigned to a constant.

Maybe `doubled_module` or `doubled_class` is a better name for this?