Allow overriding of all headers from passed environment hash

Allow REMOTE_ADDR, HTTP_HOST and HTTP_USER_AGENT to be overridden from
the environment passed into `ActionDispatch::TestRequest.new`.

Fixes #11590
Privatize non-test method
Use Ruby 2.0 caller_locations instead of caller if available

* we no more have to manipulate the each caller strings by ourselves using caller_locations

* caller_locations runs slightly faster, and creates less objects than good old caller
Benchmark (loading an Engine 1000 times):
  caller: 262.89 ms
  caller_locations: 186.068 ms
Clean up unused associations in AR test model
More unused associations in AR test models
Typo fix

[skip ci] Fixing the typo which is formed a not required link.  Check here http://api.rubyonrails.org/classes/ActionController/Base.html  under paramters section
keeping it under tt tag
change function def self.table_name to self.table_name

change def self.primary_key to self.primary_key

change def self.primary_key to self.primary_key
Merge pull request #11593 from rajcybage/fix_test_models

change function def self.table_name to self.table_name
Merge pull request #11591 from ankit8898/typo

Typo fix [ci skip]
:scissors: [ci skip]