Escape format, negative_format and units options of number helpers

Previously the values of these options were trusted leading to
potential XSS vulnerabilities.

Fixes: CVE-2014-0081
Correctly escape PostgreSQL arrays.

Thanks Godfrey Chan for reporting this!

Fixes: CVE-2014-0080
Preparing for 4.1.0.beta2 release
Merge branch '4-1-0-beta2'

Conflicts:
	actionview/CHANGELOG.md
	activerecord/CHANGELOG.md
Use the reference for the mime type to get the format

Before we were calling to_sym in the mime type, even when it is unknown
what can cause denial of service since symbols are not removed by the
garbage collector.

Fixes: CVE-2014-0082
Typo fix for unscope
Merge pull request #14098 from Amit-Thawait/master

Typo fix for unscope [ci skip]
Update Docs in favor to use render plain instead of text option
ref #14062
Merge pull request #14099 from robertomiranda/render-text-2-plain

Update Docs in favor to use render plain instead of text option
Fix render plain docs example in AM::Base

The errors were introduced in e220a34e39