add tests and fix around scoping order
add ReferenceType#sort_order to pg ond sqlite
patched reverse_sql_order to brake apart CPKs
remove sort order
revert ar to 3.2.9
bump version for 3.2.8 hack
undo 3.2.8 rollback
replaced _field_changed? method calls with field_changed?
moved to AR 3.2.9, and replaced field_changed? method calls with _field_changed?
Fix a timing issue in the test suite
Add a new subclass of ActiveRecord::Relation for CPK

This adds a subclass to avoid problems with inline caches when
dealing with Relation objects that need CPK behavior. It's not
exactly pretty because it's still operating much like a monkey
patch. The removal of the singleton class codepath should also
lighten memory usage slightly.

To work, the relation behavior selection is now elevated to
`ActiveRecord::Relation.new`. This will return an object based on
the model class passed in. `new` is also overwritten for the
subclass since we want to avoid an infinite loop. An alternative
would be to check self in the other new and simply call the
original new in that case.

In rough trials, some problematic code on implementations like
JRuby went from taking hours to complete to roughly ten minutes.
I'd consider adding benchmarks to keep this in check but at least
we can confirm that this moves performance in the right
direction.
Merge pull request #4 from strmpnk/optimize

Optimize ActiveRecord::Relation Patching