Add an api for customising how verifying doubles are checked

This is a prerequisite for rspec/rspec-rails#1238
We use `get_const` to retrieve the constant name, it was blowing up with anonymous classes (although I now realise thats because I was using a string from the name.)