[BUGFIX] Register the exception handler early in bootstrap

Currently registering the exception handler is done
after extensions are loaded to allow extensions to
modify configuration to override the exception handler
defined in LocalConfiguration or DefaultConfiguration.

Registering the exception handler so late has however
the drawback that exceptions throw before, lack proper
handling (and maybe in production even disclose more information
than needed).

Change that and register error handling much earlier
in the bootstrap so that exceptions thrown e.g. while
loading ext_localconf.php can show a proper stack trace
to give developers more useful information why the exception occurred.

To still allow extensions to override configuration,
we now remember the early exception and error handler classes
and potentially register a new exception handler after extensions
have been loaded.

Resolves: #60235
Releases: 6.2, master
Change-Id: I087173073ba75a54be14ca4f40f90c0e5304892d
Reviewed-on: http://review.typo3.org/33704
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>