Add an api for customising how verifying doubles are checked

This is a prerequisite for rspec/rspec-rails#1238
They're covered by the integration test, I couldn't find any direct specs for object references.