flatten merged join_values before building the joins

fixes #10669

While joining_values special treatment is given to string values.
By flattening the array it ensures that string values are detected
as strings and not arrays.
add explicit AS dependencies for ActiveModel::Naming

There are two missing ActiveSupport dependencies to use ActiveModel::Name class or ActiveModel::Naming module independently.

Missing dependencies for Module#delegate defined in `active_support/core_ext/module/delegation`, used at [L148](https://github.com/rails/rails/blob/master/activemodel/lib/active_model/naming.rb#L148)

Missing dependencies for Object#blank? defined in `active_support/core_ext/object/blank`, used at [L131](https://github.com/rails/rails/blob/master/activemodel/lib/active_model/naming.rb#L131)
Merge pull request #10796 from neerajdotname/10669

flatten merged join_values before building the joins
Merge pull request #11053 from yangchenyun/mine

Add explicit dependencies of ActiveSupport to enable independent usage of ActiveModel::Name
make default value for `:message` on `AM::Errors` explicit.
test-case to prevent regressions on `Association#build` with an Array.

Closes #11026
Missing mention about a generated file [ci skip]

Add a mention about the helper's test file generated invoking the
controller generator in the USAGE file
Revert "Merge pull request #11053 from yangchenyun/mine"

Those two files are required by active_support/rails.rb
loaded in active_model.rb

It is common to require common dependencies on the root
files to avoid boilerplate in each file.

This reverts commit 763635e30f17800ebc0a8ae98d780edc8ebfb4e5, reversing
changes made to 4f46ef36aaef217834f3f96d3689d32f6a6761ea.
[doc] Info added for tmp:create [ci skip]
Change a way ActiveRecord's config is prepared for rake tasks

In commit d1d7c86d0 I moved setting migrations paths into activerecord's
railtie to remove Rails dependency on databases.rake. However, it
introduced a regression, ENGINE_PATH was not available at the moment, so
engine's migrations where not added properly to paths. Fix was added
at 97a4a771, but it changes a way things work from using ENGINE_PATH to
APP_RAKEFILE. Additionally, the config runs when the code loads, while
previously it ran in the db:load_config rake task

In order to make it more in pair with original version this commit
changes the config to run only on load_config task. This code uses the
fact that defining a task in rake does not overwrite, but only appends.

It also allows to get back to checking for ENGINE_PATH
Setup env and seed_loaded for DatabaseTasks outside load_config

Those vars can be used in tasks, which not call load_config.
ActionDispatch:SSL: don't include STS header in non-https responses
replace all older rocket sign to new ":" from examples of active record and active models
Merge pull request #11067 from rajars2576/fix_older_rocket

replace all older rocket sign to new ":" from examples of active record ...
test-case to prevent regressions described in #10901.
Flag cookies as secure with ignore case in ActionDispatch::SSL
Removing deprecated rake tasks.

The `rake test:recent` and `rake test:uncommitted` tasks were
deprecated and are now being removed.
Added markdown tag for highlight
Fix `another_contract` not being used warning
Merge pull request #11075 from vipulnsward/remove_record

Remove `another_contract` as it isn't being used