AR fails to typecast high integer values on 32 bit systems

Coksnuss describes the problem in Issue #2070 quite good.

I've overwritten the method typecast. i will return now a float instead of an integer if the value exceeds PHP_INT_MAX.

I've also extended the test cases.

Tested against PHP 5.3.20 and PHP 5.4.10