domains: emit uncaughtException when appropriate
Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException'
event on the process object when no error
handler is set on the domain within which an error is thrown and an
'uncaughtException'
event listener is set on the process.
Fixes #3607 (closed).
/cc @nodejs/lts @nodejs/tsc @nodejs/collaborators