xreplace class_eval by define_method in active_record/relation

The class_eval version is slower than the define_method version.

	modified:   activerecord/lib/active_record/relation/query_methods.rb