Split out beginning of lookup and direct class for object

This also sets up an additional origin field in a class which indicates
the beginning of the lookup chain for this class. This is setup so we
can use this for implementing Module#prepend.

In a lot of places we also used lookup_begin() as a mechanism to get the
direct class for example for cache comparisons. For this case we
introduce a new better named method called direct_class() so that can be
used to get the actual class.
Add specs for Module#prepend

Based on the Rubyspec pull request submitted by rkh:

https://github.com/rubyspec/rubyspec/pull/141

This fixes a typo and adds a few additional specs for behavior that
should be verified.
Implement Module#prepend

This sets up prepending. What it does for subclassing is making sure the
subclass points to the origin class, which could be an included module.
This is done so that method lookup is still simple.

First this was attempted by walking back into the origin during lookup,
but this was causing issues with infinite loops. This approach turns out
to be much simpler in it's implementation.

Implementation is also very loosely based on some experimentation done
in #1848

Fixes #1848