Rename the primary key index when renaming a table in pg

Backport of dcc143cd702bfbfef9cb92e1fde75171d088a5ac

Fixes #12856
Closes #14088
Correct example in the engines testing guide [ci skip]

Reference #17453

Conflicts:
	guides/source/engines.md
Add array support when time zone aware attributes are enabled

Conflicts:
	activerecord/test/cases/adapters/postgresql/array_test.rb
Remove some warnings
Remove more warnings
Merge pull request #17702 from tgxworld/fix_select_tag_include_blank_false

Fix select_tag generating tag when set to false.
No need to depend on sprocket-rails and sass-rails github repository
Don't rely on `Time.current` in tests

Millisecond inequality causes failures on Travis
Merge pull request #17779 from dilpreet92/server_location

Getting the location of the server
Merge pull request #17782 from cheba/engine-root-master

Use absolute_path of caller_locations to infer engine root
Update cookies.rb

:domain option can hold also Array of domains. It was not mentioned anywhere in docs.
Merge pull request #17803 from sadfuzzy/patch-2

Update cookies.rb
Merge pull request #17811 from mrnugget/fixes_nested_association_preloading

Adds preloaded_records method to NullPreloader - fixes #16070
Merge pull request #17866 from bogdan/default-form-builder

Bugfix config.action_view.default_form_builder option
Merge pull request #17867 from tgxworld/silence_minitest_plugins

Silence Minitest for plugin tests.
docs, bring back `ActiveRecord::Core` methods in the API. [ci skip]

This `# :nodoc:` had the effect of hiding every method that follows.
This meant that the API page for `ActiveRecord::Core` only contained
`configurations` and none of the following methods.

Furthermore this `# :nodoc:` had no effect on `maintain_test_schema`.
Those `mattr_accessor` inside the `included` block are not picked up
by rdoc.

/cc @zzak
Merge pull request #17860 from SamSaffron/fix_engine_backtrace

FIX: absolute_path may be nil for code added via instance_eval
Remove environment dependency for db:schema:load

All of the behavior :environment was giving (that db:schema:load needed)
was provided as well with :load_config.

This will address an issue introduced in
https://github.com/rails/rails/pull/15394. The fact that db:schema:load
now drops and creates the database causes the Octopus gem to have [an
issue](https://github.com/tchandy/octopus/issues/273) during the drop
step for the test database (which wasn't happening in db:schema:load
before). The error looks like:

    ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR:  cannot drop the currently open database
    : DROP DATABASE IF EXISTS "app_test"

Because of the timing, this issue is present in master, 4-2-*, and
4.1.8.

A note to forlorn developers who might see this: "Additionally" in a
commit message means you should have a separate commit, with a separate
justification for changes. Small commits with big messages are your
friends.
Merge pull request #17964 from carols10cents/improve-after-commit-argumenterror-message

Make error message clearer that :on requires a symbol, not a string
Allow custom handling of non-standard types in `time_zone_conversion`

PostgreSQL for example, allows infinity as a valid value for date time
columns. The PG type has explicit handling for that case. However, time
zone conversion will end up trampling that handling. Unfortunately, we
can't call super and then convert time zones.

However, if we get back nil from `.in_time_zone`, it's something we
didn't expect so we can let the superclass handle it.

Backport of 42418cfc94d1356d35d28d786f63e7fab9406ad6 and
65588b7463b227fd63f73b56b3df9d3ea5ab8996
Fixes #17971