ar/connection_pool: honor overriden rack.test in middleware

Honoring an overidden `rack.test` allows testing closed connection between
multiple requests. This is useful if you're working on database resiliency, to
ensure the connection is in the expected state from one request to another on
the same worker.
[CI SKIP] Improve force push note.
Merge pull request #17032 from tgxworld/update_contributing_guide

[CI SKIP] Improve force push note.
Merge pull request #17020 from Sirupsen/ar-override-rack-test

activerecord/connection_pool: honor overidden rack.test in tests