MODX3 Extras, backward compatability and build-script compatibility

This is what I ended up with for MODX 3:

use MODX\Revolution\Error\modError;
/* ... */

/* Initialize $modx->error */
if (!$modx->services->has('error')) {
    $modx->services->add('error', new modError($modx));
}
$modx->error = $modx->services->get('error');