Fix harmless typo in event.cxx
Make np::util::oom() extern.
Better handling for C++ exceptions.

Using a terminate handler is not only easier to write and more portable
but automatically avoids the problem of exceptions which are thrown and
caught in the Code Under Test.

This implementation has a flaw on Linux: the current exception is of
course still allocated when the terminate handler is called, and there's
no visible way to free it, so we end up with spurious Valgrind memory
leak errors which can't even be easily suppressed.  Still, the test was
going to fail anyway.

Also added a unit test.
Better handling of uncaught NP events

These are thrown and caught sort of like exceptions.  It is possible
that an event might be thrown when no there is no code catching; handle
that case more gracefully by printing a message, including the event,
before aborting.
Catch stray STL exceptions in tdump* tests.

Because such a problem is currently breaking the SLES build.