Escape multibyte line terminators in JSON encoding

Currently, json/encoding respects the JSON spec (as it should) which 
disallows \n and \r inside strings, escaping them as expected.

Unfortunately, ECMA-262 (Javascript) disallows not only \n and \r in 
strings, but "Line Terminators" which includes U+2028 and U+2029. 
See here: http://bclary.com/2004/11/07/#a-7.3

This pull request adds U+2028 and U+2029 to be escaped.

# Why? 

It's very common to see something like this in a Rails template:

<script type="text/javascript"> 
var posts = <%= @posts.to_json %>;
</script>

If U+2028 or U+2029 are part of any attributes output in the to_json
call, you will end up with an exception.
In Chrome: Uncaught SyntaxError: Unexpected token ILLEGAL 

# Why not?

This is JSON encoding, and the JSON spec is specific about how to 
encode strings. U+2028 and U+2029 don't get special treatment.

Just trying to start a discussion... what do you do in your apps
to deal with this? Is there a convention I'm missing?
asset guide, match application.rb snippets to the generated file [ci skip]

`if defined?(Bundler)` is no longer used in our current application.rb
fix HashWithIndifferentAccess#to_hash behaviour
Rails 4 has deprecated :order in has_many to use a lambda instead, update the guide accordingly
Fix typo "can exploited" with "can be exploited"
Add a few overview bullet points
Clean up the wording in a few places
Use faster Array.new instead of []*padding
document String#to_time exception
destroys association records before saving/inserting new association records

fixes bug introduced by  #3329
These are the conditions necessary to reproduce the bug:
- For an association, autosave => true.
- An association record is being destroyed
- A new association record is being created.
- There is a unique index one of the association's fields.
- The record being created has the same value as the record being
destroyed on the indexed field.

Before, the deletion of records was postponed until after all
insertions/saves.  Therefore the new record with the identical value in
the indexed field caused a non-unique value error to be thrown at the database
level.

With this fix, the deletions happen first, before the insertions/saves.
Therefore the record with the duplicate value is gone from the database
before the new record is created, thereby avoiding the non-uniuqe value
error.
fix typo
Simple grammar updates
added to rdoc for unscope that default_scope wins
Capitalizing internet to Internet. [ci skip]
Fix broken mysql test

test_mysql_integer_not_null_defaults in test/cases/defaults_test.rb was
failing. This test relies on the connection being in strict mode. By
default a new connection is not in strict mode, but Active Record
automatically places it in strict mode.

ActiveSchemaTest overwrites the connection's #execute method in order to
prevent SQL statements from actually being executed. One of the
operations which is performed in ActiveSchema test is a #recreate_database.

Since 2088bf27981137a2c6c8b2f718f33b417b4045af, recreate_database on
mysql or mysql2 will trigger a reconnect.

Due to the implementation of the hacking of #execute in
ActiveSchemaTest, this reconnect would take place, but the connection
would *not* be placed in strict mode because #execute had been
overridden to prevent SQL queries hitting the database.

Therefore, after ActiveSchemaTest, the connection would no longer be in
strict mode, causing test_mysql_integer_not_null_defaults to fail.

I don't think that the way that ActiveSchemaTest is implemented is
particularly nice or clean, but I have taken steps to make its hacks
more isolated - it now create a separate connection object which is
thrown away after the test, and the hacks are applied on the singleton
class of this object.
Work around change in how MiniTest detects SIGINFO

MiniTest 4.7.3 detects the presence of SIGINFO and stores the answer in
a constant.

It seems that MiniTest 4.7.4 changes this, and instead relies on an
info_signal method being implemented on the runner object.

In ActiveSupport::Testing::Isolation, we use ProxyTestResult to stand in
for the runner object. This object implements `method_missing`, and as
such its #info_signal method has a truthy return value. This results in
MiniTest trying to install the SIGINFO handler on platforms where
SIGINFO does not exists.

To fix, I am simply defining an explicit ProxyTestResult#info_signal
method.
Revert "Merge pull request #10433 from wangjohn/making_callbacks_more_performant"

This reverts commit 09751fdc847c25237891a8fcb0c2312e39bbe86d, reversing
changes made to 6a5ab08d21c4284a05f5e34484b18a91d4e5c50c.

This change caused a failure in
actionpack/test/abstract/callbacks_test.rb.
Merge pull request #10413 from vipulnsward/change_grouping

Use faster Array.new instead of []*padding
Merge pull request #10417 from jholton/fix_association_auto_save

autosave_association issue that occurs when table has unique index (resubmission)
replace apostrophe with backquote for matching [ci skip]