Simplify @responses hash initialization

@responses hash needs to be initialized with mime types that we get from
Collector#collect_mimes_from_class_level. Mime::Type class as key and nil as
value. This need to happen before content negotiation. Before that, it was
looping though mime types and executing mime-type-generated method inside
collector (see
AbstractController::Collector#generate_method_for_mime). That approach resulted
in 2 unnecessary method calls for each mime type
collected by Collector#collect_mimes_from_class_level.

Now hash is initialized in place, without usage of Collector#custom method.
Inline variants syntax

In most cases, when setting variant specific code, you're not sharing any code
within format.

Inline syntax can vastly simplify defining variants in those sitiations:

  respond_to do |format|
    format.js { render "trash" }
    format.html do |variant|
      variant.phone { redirect_to progress_path }
      variant.none  { render "trash" }
    end
  end
`
Becomes:

  respond_to do |format|
    format.js         { render "trash" }
    format.html.phone { redirect_to progress_path }
    format.html.none  { render "trash" }
  end
Merge pull request #13235 from strzalek/variants-inline

Inline syntax for variants
Revert "Merge pull request #13235 from strzalek/variants-inline" -- needs a little more work!

This reverts commit 186161148a189839a1e0924043f068a8d155ce69, reversing
changes made to cad9eb178ea5eec0e27d74e93518f4ed34e2f997.
Support MySQL 5.7 explain
Remove `DEFAULT NULL` for primary key column to support MySQL 5.7.3

Since MySQL 5.7.3 m13 does now allow primary key column is null.
Merge pull request #13247 from yahonda/support_mysql573_primary_key

From http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-3.html:
"Columns in a PRIMARY KEY must be NOT NULL, but if declared explicitly as NULL produced no error. Now an error occurs."
Merge pull request #13248 from yahonda/support_mysql573_explain

Support MySQL 5.7 explain
Fix warnings on mysql2 explain test
doc: date/conversions.rb should talk about date format not time format.

Closes #13245.

[ci skip]
Simplify @responses hash initialization

@responses hash needs to be initialized with mime types that we get from
Collector#collect_mimes_from_class_level. Mime::Type class as key and nil as
value. This need to happen before content negotiation. Before that, it was
looping though mime types and executing mime-type-generated method inside
collector (see
AbstractController::Collector#generate_method_for_mime). That approach resulted
in 2 unnecessary method calls for each mime type
collected by Collector#collect_mimes_from_class_level.

Now hash is initialized in place, without usage of Collector#custom method.
Inline variants syntax

In most cases, when setting variant specific code, you're not sharing any code
within format.

Inline syntax can vastly simplify defining variants in those situations:

  respond_to do |format|
    format.js { render "trash" }
    format.html do |variant|
      variant.phone { redirect_to progress_path }
      variant.none  { render "trash" }
    end
  end

Becomes:

  respond_to do |format|
    format.js         { render "trash" }
    format.html.phone { redirect_to progress_path }
    format.html.none  { render "trash" }
  end
Fix type cast on group sum with custom expression

For PG adapters with custom expression and grouped result
of aggregate functions have not found correct column type
for it. Extract column type from query result.

Closes: #13230
Merge pull request #13236 from jetthoughts/13230_type_cast_bug_in_agr_functions

Fix type cast on group sum with custom expression
make `collect_deprecations` available.

There are circumstances where the capabilities of `assert_deprecated` and
`assert_not_deprecated` are not enough. For example if a ccertain call-path
raises two deprecations but should only raise a single one.

This module is still :nodoc and intented for internal use.

/cc @rafaelfranca
Merge pull request #13253 from strzalek/variants-inline2

Variants inline syntax v2
Rename not Ruby files to .tt
Replace with gsub! in ActiveSupport::Inflector.
Merge pull request #13257 from eshira/optimize-gsub

Replace with gsub! in ActiveSupport::Inflector
Fix typo in docs, missing colon in Symbol literal [ci skip]