Add an api for customising how verifying doubles are checked

This is a prerequisite for rspec/rspec-rails#1238
These two specs cover 2 of the 3 types of object reference implementations.  The last one (`DirectModuleReference`) is implicitly tested by the `it 'allows classes to be customised'` spec above, but I think it could make sense to add a case here for that since the type of object reference is incidental to the spec above and there's no guarantee it'll continue to exercise that code path as the codebase evolves.