Add an api for customising how verifying doubles are checked

This is a prerequisite for rspec/rspec-rails#1238
I know in the rspec-rails use case for this it needs the class, but in the more general case for this API (since it's public) we don't know that it'll want the class.  Consider that the constant may not even be loaded (in which case it'll be `nil`, right?) and suddenly the user of this API gets called with no info whatsoever about the verifying double.

Seems like it would be better to call the block with `ref` as that guarantees a useful object can always be provided to the block, and then the block can decide to access the class if it wants to.