ErrorHandler::globalHandler() returns current handler

Use static function instead of playing with globals!