This is a first pass at revising the install app's structure. Changes include:
Make the installation/index.php file the minimum code necessary to get started and hand over everything else to another file; this index.php file should be kept compatible with older PHP versions to give a "clean" error message for lack of PHP support and the rest of the handling is moved to another file that won't be included on these older versions so that the boot sequence is not inherently limited to PHP 5.2 compatible syntax forever
Adds an error.php template file in case we ever hit an error page and need it; better than a plain white page
Overloads the default JSON error handler taking advantage of the service layer; this allows the AJAX requests to send responses with the install app's custom JSON data structure
Have the InstallationControllerDefault class respect the controller interface; instead of returning the rendered view to the application it will now inject those contents into the JDocument instance and return boolean per the interface
Remove the various try/catch in the application class, these mainly exist since 3.x's error handler isn't format aware; with the new layer we can in most cases safely return a properly formatted response even in error cases
Have some of the database model throw Exceptions versus enqueuing messages directly
Start making use of PHP 5.4+ syntax
If we can write to the administrator/logs directory, register a logger for the error category; this will ensure anything triggering the global error handler writes a log message with at least the "Uncaught Exception" message from JErrorPage::render(), this could possibly help debug install related issues down the road
Testing Instructions
Install should work as expected (I've explicitly checked the first parts of it so far, I haven't gotten to pages like the FTP config or install languages)
When an Exception is thrown, this should trigger an appropriately formatted response (most of the time it'll be the JSON based requests) and this should be handled correctly showing an alert box
Documentation Changes Required
N/A
TODO
Validate the changes for the FTP configuration step
Validate the changes for the language install steps