Fixed CVE-2014-8793

Also includes a better fix for 12f9465f9f6d97072ef19b62b4e2ceb0a6bf4543
Fixed CVE-2014-8875
Preparing for 3.0.6
Preparing for 3.1.0

Merge branch 'RELEASE_306' into RELEASE_310

Conflicts:
	RELEASE_NOTES.txt
	constants.php
Merge remote-tracking branch 'origin/master' into RELEASE_310
Post 3.1.0