Remove unnecessary db call when replacing.

When replacing a has_many association with the same one, there is no
need to do a round-trip to the db to create/and drop a new transaction.

[fixes #14220]
Merge pull request #14234 from arthurnn/fix_trans_on_replace

Remove unnecessary db call when replacing.
Refactor tests from BaseRackTest into BaseRequestTest
Fix warnings due to:
- unused variable in PG Adapter.
- Ambiguous argument warning from range_test for use - to + Infinity range without brackets.
Merge pull request #14248 from vipulnsward/fix-pg-ar-warnings

Fix PG warnings.
Merge pull request #14239 from zzak/refactor_actionpack_dispatch_request_tests

Refactor actionpack ActionDispatch::Request tests
Add a comment to ensure that a test won't be removed [ci skip]

The 'cow' => 'kine' inflection has gone with c300dca9 but it should
not be removed from the tested irregularities since it ensures that
inflections work with words that do not begin with the same letters.
Add spaces to deep_munge log message.
Merge pull request #14258 from shuhei/fix_deep_munge_log

Add spaces to the log message of ActionController:: LogSubscriber#deep_munge