Fixes #3931: Allow Kohana to shutdown properly and then exit(1) in case of exception