Do not re-save destroyed association on saving parent object

Closes #11450
Merge pull request #11451 from jetthoughts/11450_do_not_resave_destroyed_association

Do not re-save destroyed association on saving parent object
use arel rather than slapping together SQL strings
reorder bind parameters when merging relations
removing useless assingment
save another array allocation
Lock mysql2 version to 0.3.11 since 0.3.12 is failing right now. Check #11457 for details
Added generated unit test for generator generator and new test:generators rake task included in test:all rake task.
Merge pull request #11419 from simi/generator_generator_test

Added generated unit test for generator generator.
`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