Also improve fatal handling so that fatal reason is added to the alert
message. Also add an extra "throw" after alert dismissal which gets
logged in the browser console.
Instead of having a separate panic concept which previously differed from
fatal error handling in that there was no context attached to the error,
use fatal errors also for call sites which previously used the panic handler.
Because these call sites are context-free (DUK_ASSERT() failures) simply call
the Duktape-wide default fatal error handler instead of the user fatal error
handler. For heap creation errors (self test failures) the udata is available;
for assertion it isn't and NULL is used instead.
Add a config option to replace the Duktape-wide fatal error handler; the
default one just segfaults on purpose, to avoid creating postability issues
by depending on e.g. abort().
Remove the error code from the fatal error function signature (it's mostly
pointless) and change the "ctx" argument to "udata" (heap userdata) which is
less confusing than an arbitrary context related to the heap (especially
because it's unsafe to actually use the "ctx" to e.g. call into the Duktape
API).
The fatal error signature change also affects the duk_fatal() API call, which
loses the error code argument.
* Remove DUK_USE_DPRINT_COLORS and the whole colored log feature.
* Add DUK_USE_DEBUG_WRITE() duk_config.h macro to actually write log
entries. Postpone formatting of the message there (except for the
body of the message) so that it can implement coloring etc as needed.
* Also move debug formatting buffer into a stack local rather than a
global to avoid thread issues.