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.
Merge pull request #1456 'fix-for-3515' into 2.4

Conflicts:
	lib/Cake/Test/Case/View/ViewTest.php

Fixes #3515
Refactor tests to use a data provider.