Improve a bit the 4.1 release notes [ci skip]

Fix a few typos. #present_in has been changed to #presence_in through
commit d61baee5.
set the error callback to a nice default in case nobody set an error callback and an error happens
Handle missing environment from non empty config

If using a `DATABASE_URL` and a `database.yml`. The connection information in `DATABASE_URL` should be merged into whatever environment we are in. As released in 4.1.0rc1 if someone has a database.yml but is missing a key like production:

```yml
development:
  host: localhost

```

Then the check for blank config will return false so the information from the `DATABASE_URL` will not be used when attempting to connect to the `production` database and the connection will incorrectly fail.

This commit fixes this problem and adds a test for the behavior.

In addition the ability to specify a connection url in a `database.yml` like this:

```
production: postgres://localhost/foo
```

Was introduced in 4.1.0rc1 though should not be used, instead using a url sub key

```
production:
  url: postgres://localhost/foo
```

This url sub key was also introduced in 4.1.0rc1 though the `production: postgres://localhost/foo` was not removed. As a result we should not test this behavior.
Merge pull request #14236 from hone/4-1-stable

Backport 283a2ed from master to 4-1-stable
live controllers should have live responses

detect the type of controller we're testing and return the right type of
response based on that controller.  This allows us to stop doing the
weird sleep thing.
use built-in exception handling in live controllers

when an exception happens in an action before the response has been
committed, then we should re-raise the exception in the main thread.
This lets us reuse the existing exception handling.
make sure we wait for the threads to shut down before asserting closure
Merge pull request #14226 from senny/14109_partial_revert

`includes` uses SQL parsing when String joins are involved.
Merge pull request #14258 from shuhei/fix_deep_munge_log

Add spaces to the log message of ActionController:: LogSubscriber#deep_munge
Correctly apply the default options for the `button_tag` helper

Fixes #14254

[Sergey Prikhodko]
Simplify handling of defaults/options in button_tag

There's no need to rely on Active Support's Hash#reverse_merge for
simple cases with default values, since we can just merge from the
default rather than reverse merge from the options.

This also avoids the creation of one extra hash object by moving to a
Hash#merge! call.
Use 1.9 style hash on docs [ci skip]
docs, flash message keys are normalized to strings. [ci skip]

This is a follow up to a668beffd64106a1e1fedb71cc25eaaa11baf0c1
Take variants into account when calculating template digests in ActionView::Digestor
Fix for external generators extend Erb::Generators

HAML and probably other generators extend this class and invoke
filename_with_extensions with the old signature (without format).
This makes the second argument optional and defaults it to the #format
method which could be overridden as well.

Closes #14132.
Always return an array from formats so there is no need to wrap it when calling
Do note remove `Content-Type` when `render :body`

`render :body` should just not set the `Content-Type` header. By
removing the header, it breaks the compatibility with other parts.

After this commit, `render :body` will returns `text/html` content type,
sets by default from `ActionDispatch::Response`, and it will preserve
the overridden content type if you override it.

Fixes #14197, #14238

This partially reverts commit 3047376870d4a7adc7ff15c3cb4852e073c8f1da.
Introduce `Rails.gem_version`

This method return `Gem::Version.new(Rails.version)`, suggesting a more
reliable way to perform version comparison.

Example:

    Rails.version #=> "4.1.2"
    Rails.gem_version #=> #<Gem::Version "4.1.2">

    Rails.version > "4.1.10" #=> false
    Rails.gem_version > Gem::Version.new("4.1.10") #=> true
    Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true

This was originally introduced as `.version` by @charliesome in #8501
but got reverted in #10002 since it was not backward compatible.

Also, updating template for `rake update_versions`.
Merge pull request #14103 from sikachu/4-1-stable-fix-versioning-task

Introduce `Rails.gem_version`
Merge pull request #14296 from joker1007/fix_rails_guides_about_active_record_default_timezone

Fix guide about `config.active_record.default_timezone` [ci skip]