Prevents stack level too deep on inverse_of relations

When a relation is specified with an inverse_of the association_cache
will loop continuously between the parent and child records causing a
stack level too deep, this fix prevents this by checking for the
presence of the record in the output_hash first, added inverse of to
test models as well to test for this condition.  To reproduce the error simply comment out the change in extractor.rb and run the test.