Merge pull request #16411 from calebthompson/backport-param-changes

Fix undefined method to_query for Hash
Conflicts:
	activesupport/lib/active_support/core_ext/object/to_param.rb
	activesupport/test/core_ext/object/to_query_test.rb