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