Extract tests code out from AR's base_test.rb to integration_test.rb

`AR::Base#to_param` and `AR::Base#cache_key` is defined at
active_record/integration.rb, so tests for those methods should be at
integration_test.rb
Merge pull request #10396 from tkhr/extract-test-code-from-base_test.rb

Extract tests code out from AR's base_test.rb to integration_test.rb