Changes to PHP error handling.

This commit attempts to solve a problem of minor PHP errors causing the app to exit. App will now exit only if the error event was not handled, allowing developers to set up custom error handlers that will ignore certain types of errors (eg notices). PHP errors are also logged using an appropriate level, depending on error code (E_ERROR, E_NOTICE etc). A shutdown function is also registered to attempt to catch fatal errors (and at least log them).

See here for more details:
http://www.yiiframework.com/forum/index.php/topic/41244-handling-php-errors/