make tests pass on Ruby 2.2

Apparently we've been using a buggy feature for the past 6 years:

  https://bugs.ruby-lang.org/issues/9593
passing an ActiveRecord object to `exists?` is deprecated.

Pass the id of the object to the method by calling `.id` on the AR
object.
passing an instance of an AR object to `find` is deprecated

please pass the id of the AR object by calling `.id` on the model first.
Test deprecation warning for passing an ActiveRecord object to
`exists?`
Make select_all on query cache accept a Relation without binds.

[fixes #14361]
[related #13886]
require actions rather than create_file

thor's create_file seems to have a circular dependency on itself when
used with our constant loading stuff.

fixes #14319
Merge pull request #14375 from laurocaetano/test-deprecation-warning-for-exists

Add test for deprecation warning for passing an AR object to `exists?`.
Add test for deprecation warning for passing an AR object to `find`.
Merge pull request #14376 from laurocaetano/test-deprecation-warning-for-find

Add test for deprecation warning for passing an AR object to `find`.
Merge pull request #14372 from arthurnn/fix_query_cache_binds

Make select_all on query cache accept a Relation without binds.
No need to binds be optional
Fix probs in sections 5.6 and 5.9; [ci skip]
Merge pull request #14378 from afshinator/master

Fix probs in sections 5.6 and 5.9; [ci skip]