`change_column` for PG adapter respects `:array` option.
Unifies mysql and mysql2 casting of booleans

Using the mysql2 adapter, boolean values were sometimes being incorrectly cast
to 't' or 'f'. This changes the cast to match the mysql adapter behavior, ie 1 and 0.
Merge pull request #11120 from awilliams/ar_mysql2_boolean_quoting

Fixes AR mysql2 adapter incorrectly casting boolean values
Move initializing process for query cache to ActiveRecord::ConnectionAdapters::QueryCache module.
Merge pull request #11435 from kennyj/move_to_query_cache

Move initializing process for @query_cache to QueryCache module.
Fixed USAGE file for generator [ci skip]
Merge pull request #11458 from arunagw/fix_usage_file

Fixed USAGE file for generator [ci skip]
Skip Rack applications and redirects when generating urls

When generating an unnamed url (i.e. using `url_for` with an options
hash) we should skip anything other than standard Rails routes otherwise
it will match the first mounted application or redirect and generate a
url with query parameters rather than raising an error if the options
hash doesn't match any defined routes.

Fixes #8018
removes the obsolete private method column_methods_hash [Closes #11406]
make sure scope_chain_items has consistent types
use Relation#merge to combine scope chain items
just push on to the scope chain items. Oops! (thanks @carlosantoniodasilva)
cache the scope chain on the stack and eliminate `i`
cache the klass member of the reflection
decouple the manager class from building join constraints
parent_table is only used internally
Revert "Merge pull request #11120 from awilliams/ar_mysql2_boolean_quoting"

This reverts commit cb1d07e43926bcec95cb8b4a663ca9889173395a, reversing
changes made to 754a373e301d2df0b12a11083405252722bc8366.
Add `#any_of` query method to active_record

This method is inspired by [any_of from
mongoid](http://two.mongoid.org/docs/querying/criteria.html#any_of).

It allows to compute an `OR` like query that leverages AR's `#where` syntax:

    manual_removal = User.where(id: params[:users][:destroy_ids])
    users = User.any_of(manual_removal, "email like '%@example.com'", {banned: true}).destroy_all

It can be used directly on model class, or through an association, or
behind an other relation.

    manual_removal = User.where(id: params[:users][:destroy_ids])
    User.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    @company.users.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    User.where(offline: false).any_of( manual_removal, "email like '%@example.com'", {banned: true})

Its main purpose is to both :

* remove the need to write a sql string when we want an `OR`
* allow to write dynamic `OR` queries, which would be a pain with a string

There's also a negative version, `#none_of`. This will return all active
users :

    banned_users = User.where(banned: true)
    unconfirmed_users = User.where("confirmed_at IS NULL")
    active_users = User.none_of(banned_users, unconfirmed_users)