Inject app in function or object that handler error.

Inject $app in function or object that handler error.
When we use a object like: 
```php 
$app->error(new ErrorHandler);
``` 
or a array like: 
```php 
$app->error(array('ErrorHandler', 'myMethod'));
``` 
we cant use $app inside the class. Now we can do it:
```php 
class ErrorHandler 
{
    public function __invoke(\Exception $exception, $request, $app, $code)
    {
        if ($app['debug']) {
            return;
        }

        $app['monolog']->addError(sprintf('An error occurred: %s', $exception->getMessage()));
    }
}
``` 
or
```php 
class ErrorHandler 
{
    public function myMethod(\Exception $exception, $request, $app, $code)
    {
        if ($app['debug']) {
            return;
        }

        $app['monolog']->addError(sprintf('An error occurred: %s', $exception->getMessage()));
    }
}
```