backport runner fixes to 3-2-stable

Add a runner hook to Rails::Application and Rails::Engine that requires
ActiveRecord::Base to avoid circular constant loading when using observers.

This commit backports cc7dd66, c0ba0f0 and 8d01c61.
adding test for CVE
test case to assert that associations do not overwrite after create, fixes #9310
Common behavior with adding formats to lookup_context for TemplateRenderer and PartialRenderer
Chained scopes will be preloaded properly. Fixes #7490
Merge pull request #7792 from seejee/chained_scopes_preload_properly

Fixes Issue #7490: Chained scopes will preload properly
Use 1.8 hash style in test views

Introduced in 2c22376fe04b89e8f34620139720b85a85ce3428
Fix typo in view name

Introduced in 2c22376fe04b89e8f34620139720b85a85ce3428
Fix explicit names on multiple file fields

If a file field tag is passed the multiple option, it is turned into an
array field (appending "[]"), but if the file field is passed an
explicit name as an option, leave the name alone (do not append "[]").

Fixes #9830
Merge pull request #10105 from rmm5t/fix-explicit-name-on-multiple-fields

Fix explicit names on multiple file fields
Improve the changelog entry [ci skip]
Merge branch '3-2-later' into 3-2-stable

* 3-2-later:
  adding test for CVE
Correctly parse bigint defaults in PostgreSQL, Backpost #10098.

Conflicts:

	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
	activerecord/test/cases/schema_dumper_test.rb
Merge pull request #10172 from senny/10098_backport

Backport: Correctly parse bigint defaults in PostgreSQL
Document nested attributes as hash of hashes

Document the possibility to use a hash of hashes for nested attributes for a one-to-many association (in addition to the documented possibility to use an array of hashes).

Align indentation in comments.
Merge pull request #9688 from alexeymuranov/doc-nested-attributes-3-2

3-2-stable documentation: the possibility to use a hash of hashes for nested attributes
Fix "Scaling Rails Screencasts" link in caching guide

Closes #10241 [ci skip]
Use secure source in generated Gemfile for creating new plugin. Closes #10245
Merge pull request #10246 from prathamesh-sonpatki/3.2.13-https-rubygems

Using secure source https://rubygems.org when generating new plugin with Rails 3.2
adding a test for root path in the app