core: Mark exit() calls with status codes

Also, exit with 128+n for signal exit n, as is The Unix Way.
core: Remove the nextTick for running the main file

Not necessary, since we can handle the error properly on the first tick
now, even if there are event listeners, etc.