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
Add missing calls to parent.
Better support various ranges as described in RFC2616

Refs #3914
Fixes errors in tests with APC installed but not enabled in CLI.
Merge pull request #1437 from Phally/master-apc-errors

Fixes errors in tests with APC installed but not enabled in CLI.
Adds order to the test models to make the results more predictable.

Even though there was some code in place to prevent results in random
order from PostgreSQL we were still experiencing this with Jenkins
and Travis.

This commit removes the old code that handled this. From now on this
will be handled differently. Every test model will order by its
primary key. You can disable this by changing the order property
of the model to `null`: `$testModel->order = null`.
Added missing test + minor cleanup of ViewTests.php

Added missing block reset test through assign().
Also made some minor cleanup in ViewTests.php. Mostly docblocks (params, returns) but also some unused variables.
Merge pull request #1441 from ravage84/ViewTestsCleanup

Added missing test + minor cleanup of ViewTests.php
Replaces deprecated paginate() calls in controller bake templates.

Fixes #3895.
Merge pull request #1443 from Phally/master-3895

Replaces deprecated paginate() calls in controller bake templates.
Fixes cake bake all. Refs #1443.
Merge pull request #1445 from Phally/master-3895-2

Fixes cake bake all. Refs #1443.
Paths for App::build() require trailing /.
Merge pull request #1447 from Phally/master-bootstrap

Paths for App::build() require trailing /.