Use require_dependency in generated controllers

Using require in development mode will prevent required files from
reloading, even if they're changed. In order to keep namespaced
application_controller reloadable, we need to use require_dependency
instead of require.
Restore the frozen state on rollback. Fixes #6417.

This is a 3-2-stable backport for #6420 which was merged into master.

Currently, when saving a frozen record, an exception would be thrown
which causes a rollback. However, there is a bug in active record that
"defrost" the record as a side effect:

    >> t = Topic.new
    => #<Topic id: nil, ...>
    >> t.freeze
    => #<Topic id: nil, ...>
    >> t.save
    RuntimeError: can't modify a frozen Hash
    >> t.frozen?
    => false
    >> t.save
    => true

This patch fixes the bug by explictly restoring the frozen state on the
attributes Hash after every rollback.
Merge pull request #6445 from chancancode/3-2-stable_restore_frozen_state_on_rollback

Restore the frozen state on rollback. (Backports #6420)
Fixes the build break caused by 9ee8528 in #6445.

Ruby 1.8 raises a TypeError when trying to modify a frozen Hash, while
Ruby 1.9 raises a RuntimeError instead. Also, Ruby < 1.9.3 uses a
lowercase 'hash' in the exception message while Ruby >= 1.9.3 uses an
uppercase 'Hash' instead. This commit normalizes those issues in the
test case.
Merge pull request #6451 from chancancode/3-2-stable_restore_frozen_state_on_rollback

Fixes the build break caused by 9ee8528 in #6445.
Use Shellwords to scape arguments in db:structure:dump for PostgreSQL.

fixes #5913
Synchronize the ConnectionPool#release method to avoid thread safety issues [#6464]

Fixes #6464

Synchronize the contents of the release method in ConnectionPool due to
errors when running in high concurrency environments.

    Detected invalid hash contents due to unsynchronized modifications
with concurrent users
    org/jruby/RubyHash.java:1356:in `keys'
/usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a
ctive_record/connection_adapters/abstract/connection_pool.rb:294:in
`release'

/usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a
ctive_record/connection_adapters/abstract/connection_pool.rb:282:in
`checkin'
Merge pull request #6467 from aselder/3-2-stable

Synchronize the body of the ConnectionPool#release method to improve thread safety.
Merge pull request #5925 from Juanmcuello/pg_structure_dump

Quote arguments in db:structure:dump for PostgreSQL.
Merge pull request #5244 from fotos/myqsl2_wait_timeout

Maximum wait_timeout on Windows is 2147483
remove unnecessary memcache equire in ActionDispatch::Session::CacheStore
Merge pull request #6494 from pwim/no-memcache-require

memcache require not needed for cache store
Fix railties_order when application object is passed

railites_order method, introduced in 40b19e0, had a bug that was causing
loading application instance twice in initializers if railties_order
already included application instance. So for example

    railties_order = [Foo::Engine, :main_app, Bar::Engine]

would result in such railties array:

    [MyApp::Application, Foo::Engine, MyAppApplication, Bar::Engine]

In order to fix it, we need to check for existence of application in
both railties_order and railties arrays.
Display annotations from .coffee files in `rake notes`
bumping to 3.2.4.rc1
Exceptions like Interrupt should not be rescued in tests.

This is a back-port of rails/rails#6525. See the commit notes there for
details.
Merge pull request #6531 from freerange/3-2-stable-minitest-passthrough-exceptions

Exceptions like Interrupt should not be rescued in tests.
Remove irrelevant assertion
Merge pull request #6519 from oscardelben/3-2-stable

Display annotations in coffee files
True, False, and Nil should be represented in as_json as themselves.

Conflicts:

	activesupport/lib/active_support/json/encoding.rb
	activesupport/test/json/encoding_test.rb