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.
test case to assert that associations do not overwrite after create, fixes #9310
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
just clear the caches on clear! rather than replacing. fixes #10251
adding test for the symbol refs
Fix ActiveRecord::Store not tracking changes
Merge pull request #10448 from arunagw/bug-fix-scaffold-generator-master

Fixes Scaffold generator with --assets=false
Conflicts:
	railties/CHANGELOG.md

Conflicts:
	railties/CHANGELOG.md
	railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
Merge pull request #10466 from prathamesh-sonpatki/scaffold-assets

Fix tests related to scaffolding generator with --assets=false switch
Merging in fix from #8222
Merge pull request #10406 from greenriver/distance_of_time_rational

Correct time_ago_in_words to handle situation where Fixnum#/ returns a Rational (thanks to mathn)
Merge pull request #10478 from cainlevy/patch-1

use canonical #controller_path logic in controller test cases
Conflicts:
	actionpack/lib/action_controller/test_case.rb
Merge pull request #10489 from greenriver/ar_counter_cache_multiple_destroy

Confirm a record has not already been destroyed before decrementing counter cache

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/associations/builder/belongs_to.rb
Build fix for scaffold generator 

3-2 behaves different when scaffolding.
Merge pull request #10496 from arunagw/build-fix-scaffold-generator

Build fix for scaffold generator