Fix for #3515, functional extension & tests

https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3515

I used (string) because it is faster than strval() and there are no real benefits in this case.
Also enabled assign(), append() and prepend() to take any values convertible to string.

Removed try/catch as discussed with ADmad.
Changed the three exception expecting tests to check for PHPUnit_Framework_Error now.
unify null checks - avoid method call in favor of strict check
simplyfy test and correct some test param orders
a few more orders in test case corrected
RedirectRoute class does not honor persist as array with custom route elements.

Custom route elements like '/:lang/etc' should be persisted by redirect
routes as they are in standard routes.

Refs #GH-1531
Merge pull request #1533 from dereuromark/master-null-checks

unify null checks - avoid method call in favor of strict check
Add a test for Hash::sort()

Closes #3956
Makes PHPCS pass again.
Merge pull request #1537 from Phally/master-cs

Makes PHPCS pass again.
Remove insertQuery and deleteQuery.

These properties were never implemented and are misleading when people
try to use them.

Closes #3997
Merge branch 'master' into 2.4

Conflicts:
	lib/Cake/Network/CakeResponse.php
	lib/Cake/TestSuite/CakeTestCase.php
Pass Controller:$components config to mocked components

Otherwise there can be significant differences in behavior between using
an unmodifiedcomponent in testAction and using a mock as the config will not be
propogated from the controller
Merge pull request #1539 from cakephp/feature/2.4-mock-components-with-config

BugFix: 2.4 mock components with config
Conditionally define constants in the CLI environment.

Only define constants if they don't already exist. Users can modify
`app/Console/cake.php` and define constants before this code executes.

Fixes #4000
Merge branch 'master' into 2.4
Update version number to 2.4.0-RC2
sync and correct generic css
Merge pull request #1541 from dereuromark/master-css

sync and correct generic css
Remove invalid code.

Fixes #4002
Breaking trigger_error() to multiple lines to shorten the line length.

As proposed in https://github.com/cakephp/cakephp/pull/1525/files#r5779374