Reinstate (loop == NULL) check in jl_atexit_hook()

This is needed for jl_exit() calls before _julia_init(), e.g. in repl.c
command line processing.

Use jl_safe_printf() in mach_segv_listener.

Refactor pairs of calls to jl_printf() & jl_exit(1) into calls to
jl_error[f](), which does the same thing during early init.