Include QueryMethods in delegated subclasses of ActiveRecord::Relation for
translated model. This enables translated query methods on associations, as
discussed in #303.
Check that delegated relation classes are defined before including
QueryMethods from them, to safeguard against changes in ActiveRecord.