Update Migration and 4.0 Release Guides, Changelogs [#8267]
Fix broken test for postgresql

For some reason postgresql doesn't pass an integer value to load.

cc @tenderlove
BufferedLogger is deprecated too.
Updated security guide with information about secret_token.rb and to suggest securing sensitive files like database.yml and secret_token.rb
Merge pull request #8581 from garysweaver/security_guide_update

Update security guide
Remove ActiveModel::Errors#add_on_present method.

We don't need to define a new method in ActiveMode::Errors for each
validatior.

See
https://github.com/rails/rails/commit/d72a07f1d1478db9daed847eadb35bfd840674f6#commitcomment-2325333
Use :present as key for the absence validatior message
Remove CHANGELOG entry for ActiveModel::Errors#add_on_present
Merge pull request #7376 from dmitriy-kiriyenko/fix-double-callback-in-same-statement

Prevent callback from being set twice.

Conflicts:
	activesupport/CHANGELOG.md
Updated security guide to reference secret_key_base instead of secret_token, with a little information about the change from CookieStore to EncryptedCookieStore.
Merge pull request #8584 from garysweaver/security_guide_update

Updated security guide to reference secret_key_base instead of secret_token
Merge pull request #8267 from marcandre/reversible_drop_table_etc

Reversible commands
Fix calling quote column name in interpolated string
Remove duplicated methods in command recorder and duplicated test name
Revert "Make sure that RAILS_ENV is set when accessing Rails.env"

This reverts commit b3125c89f42968bec6ee0b92ab93e36dbc36d5c3.

* It is not desirable to set `ENV['RAILS_ENV']`; otherwise, it will leak
  through to rake tasks such as `rake test` or `rake spec`. See #7175
  for more details.
Correctly shows RAILS_ENV=development even when ENV['RAILS_ENV'] is not set (e.g., in Pow)

* Fixes #8025
Merge pull request #7312 from krainboltgreene/http-token-parser-bug

Http token parser bug
Merge pull request #8574 from alindeman/rails_env

Correctly shows RAILS_ENV=development even when ENV['RAILS_ENV'] is not set (e.g., in Pow)
Refactor Hash.from_xml.

Three basic refactors in this PR:

* We extracted the logic into a method object. We now don't define a tone of extraneous methods on Hash, even if they were private.
* Extracted blocks of the case statement into methods that do the work. This makes the logic more clear.
* Extracted complicated if clauses into their own query methods. They often have two or three terms, this makes it much easier to see what they _do_.

We took care not to refactor too much as to not break anything, and put comments where we suspect tests are missing.

We think ActiveSupport::XMLMini might be a good candidate to move to a plugin in the future.
Merge pull request #8471 from kytrinyx/refactor-xml-to-hash

WIP Refactor xml conversion to hash