Add an api for customising how verifying doubles are checked

This is a prerequisite for rspec/rspec-rails#1238
The only problem with doing this with an anonymous class like this is it means that we're not testing the primary use case (which would be using a string name and having it work both isolated and when loaded).