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