Allow for using class instance in block passed to stub method

It allows to use and test mocked object in block
passed to stub or using_self method (among others)

It is especially useful when stubbing #all_instances