Fix the "testAssetUrlNoRewrite" test

When running the test in the browser from somewhere other than
http://localhost (e.g. http://foo.dev), the test was failing.
Merge pull request #1419 from ataylor32/fix-helper-test

Fix the "testAssetUrlNoRewrite" test
Moves code out of the try/catch blocks in the connect() methods.

That code wouldn't throw a PDOException, so having it in the
try/catch block is pointless. Moving it out makes it easier to
read.
Merge pull request #1420 from Phally/master-trycatcheverything

Moves code out of the try/catch block in Mysql::connect().
Correct off by one error.

Refs #3914
Fix being unable to sort on custom synthetic columns.

If a sort field whitelist is used we should trust its data and also
trust that the developer wanted what they asked for. This solves issues
where it was impossible to sort on synthetic columns added in custom
find types.

Fixes #3919
Ignore asset requests containing %2e in them.

urldecode URI's early to avoid issues with encoded `.` characters.
Simplify whitelist logic.
Update version number to 2.3.8
Merge branch 'master' into 2.4

Conflicts:
	lib/Cake/Test/Case/View/HelperTest.php
	lib/Cake/VERSION.txt