Merge pull request #11971 from freerunningtechnologies/dynamic_respond_to

Performance regression in AR::Base.respond_to?

Related with #12120

Conflicts:
	activerecord/test/cases/finder_respond_to_test.rb
Revert "Merge pull request #12085 from valk/master"

This reverts commit 15455d76c8d33b3767a61e0cdd2de0ff592098ef, reversing
changes made to ffa56f73d5ae98fe0b8b6dd2ca6f0dffac9d9217.