Merge pull request #16004 from JuanitoFatas/doc/patch-1

[ci skip] Add missing prologue section of upgrading ruby on rails guide.
Fix SQL injection when querying against ranges and bitstrings

Fix CVE-2014-3483 and protect against CVE-2014-3482.
Preparing for 4.1.3 release
Merge branch '4-1-sec' into 4-1-stable

Conflicts:
	actionmailer/CHANGELOG.md
	actionpack/CHANGELOG.md
	actionview/CHANGELOG.md
	activerecord/CHANGELOG.md
	activesupport/CHANGELOG.md
	railties/CHANGELOG.md
Quote range strings when quoting PG ranges

The test case for CVE-2014-3483 doesn't actually send the generated SQL
to the database. The generated SQL is actually invalid for real inputs.
Merge pull request #16021 from sgrif/sg-range-quotes-4-1

Quote range strings when quoting PG ranges (4-1-stable)
Make sure range strings are quoted after we quote the range.
Preparing for 4.1.4 release
Merge branch '4-1-4' into 4-1-stable

Conflicts:
	actionmailer/CHANGELOG.md
	actionpack/CHANGELOG.md
	actionview/CHANGELOG.md
	activerecord/CHANGELOG.md
	activesupport/CHANGELOG.md
	railties/CHANGELOG.md
Merge pull request #16026 from lucasmazza/lm-respond-to-jsonp-fix

Change the JSON renderer to enforce the 'JS' Content Type
Conflicts:
	actionpack/CHANGELOG.md
Merge pull request #16038 from tbpgr/fix_guide_active_record_validations

Fix guide. sample code syntax error.[ci skip]
Merge pull request #16049 from matthewd/find-via-reload

After find-via-reload, the record is not new

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/persistence.rb
	activerecord/test/cases/persistence_test.rb
Merge pull request #16028 from cade/fix_counter_cache_count_with_association_selects

Add `:all` argument to `count` in `reset_counters`

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/lib/active_record/counter_cache.rb
Fix escape_once double-escaping hex-encoded entities

(This is a manual merge of #9102)
The hex escape sequence can be of any length
Add CHANGELOG for c803b90

Conflicts:
	actionview/CHANGELOG.md
fixed issue with ActiveRecord serialize object as JSON

fixes #15594
Merge pull request #16065 from matthewd/mysql-explicit-non-strict

If our connection is explicitly non-strict, tell MySQL
Merge pull request #16059 from jenncoop/json-serialized-attr

Fixed issue with ActiveRecord serialize object as JSON
Merge pull request #16044 from jjb/patch-1

[ci skip] link directly to ActionMailer Previews documentation