Add test for chaining a search scope onto itself
Simplify methods for generating order
Call scoped so that we always have a AR::Relation

That way, we don't need to special-case in ScopeOptions#apply
Support chaining a scope onto itself
Merge branch 'fix-chaining'