Fix stubbing so it works with a prepended module.
The prepend logic isn't just for classes.

It's for any object with a prepended module in its
singleton class's ancestor chain.
Improve prepended module detection.

- Add spec showing that we don't mutate the ancestor
  chain in cases where there is no prepended module
  overriding the method.
- Handle objects with multiple prepended modules.
- Extract prepended_modules method on proxy. It
  is memoized, which can improve perf a bit if
  multiple methods get stubbed.
- Rename method.
Ensure we always get a viable prepended module.

- If the user prepends another module between examples,
  our module may no longer take precedence.
- Fix the pollution spec -- it wasn't actually failing properly.
Extract prepend detection into RubyFeatures.
remove the defined order restriction
Deal with bug in ruby 2.0.0p247.

If we don't rescue this error, then it can leave
partial doubles in a permanently inconsistent
state for the rest of the process.

The best we can do is just rescue and issue a warning.
Remove need for `rescue NameError` on ruby 2.0.0.

This was needed because of a bug in our prepended
module detection. The logic was originally written
against ruby 2.1, where `object.singleton_class.ancestors`
always includes the singleton class. On ruby 2.0,
it only includes the singleton class if there is a
prepended module. If there is not a prepended module,
it's not in the ancestors array and our `take_while`
logic considered EVERY ancestor to be a prepended
module even though there were none.

Instead, we can find the prepended module by taking
all ancestors until the first class.
Merge pull request #586 from rspec/bugfix_for_prepend

Demonstrate issue with stubbing out a class that's been prepended.