Hash#deep_*_keys(!) recurse into nested arrays.

Following methods now recursively transform nested arrays, too.

* Hash#deep_transform_keys
* Hash#deep_transform_keys!
* Hash#deep_stringify_keys
* Hash#deep_stringify_keys!
* Hash#deep_symbolize_keys
* Hash#deep_symbolize_keys!
Fixes Issue #13466.

Changed the call to a scope block to be evaluated with instance_eval.
The result is that ScopeRegistry can use the actual class instead of base_class when
caching scopes so queries made by classes with a common ancestor won't leak scopes.
Put attr_reader in with all of the other instance methods

This makes the grouping make a little more sense
Delegate `type_cast_for_write` to injected type object
Merge pull request #15208 from sgrif/sg-delegate-type-cast-for-write

Delegate `type_cast_for_write` to injected type object
fix variable names, only pass hashes to the positional args method
fewer hash allocations when calling url_for
fewer method calls and string garbage when there is no user/password
push arg checking up
push only_path conditional up
mutate the path string to avoid object allocations
fewer string allocations per url_for
we don't use this parameter for anything, so rm
Merge pull request #15154 from msgehard/move_password_field

Put attr_reader in with all of the other instance methods
Prevented belongs_to: touch propagating up if there are no changes being saved
Delegate `klass` to the injected type object
Revert "Revert "Merge pull request #8313 from alan/only_save_changed_has_one_objects""

This reverts commit e94e6c27af495a2460c811bb506459f1428dec6b.

Conflicts:
	activerecord/CHANGELOG.md

The original commit was reverted only to be safe since #14407 were reported.
We don't have any proof we added a regression with the original commit
so reverting it now will give us more problem.

Closes #14407
Merge pull request #14979 from brocktimus/master

Making belongs_to: touch behaviour be consistent with save updating updated_at
Merge pull request #15205 from sgrif/sg-delegate-klass

Delegate `klass` to the injected type object
Merge pull request #14544 from jefflai2/named_scope_sti

Fixes Issue #13466.

Conflicts:
	activerecord/CHANGELOG.md