Improvements to shutdown-related signal handling:

- All internal uinet threads and all application threads that use the
  uinet API now mask all signals.  This avoids a deadlock scenario
  between uinet_shutdown() waiting for the shutdown thread to complete
  when running in a signal handler executing in the context of a
  thread that is holding a lock that must be acquired for the shutdown
  thread to proceed.

- An additional thread is now spawned by libuinet that unmasks all
  signals, to ensure that at least one thread is available to process
  signals.  At some point this will become configurable as this can
  subvert careful thread signal mask policing by some applications.

- The shutdown thread will now respond to multiple shutdown trigger
  messages, but only execute the shutdown actions once.  This provides
  better behavior in applications where uinet_shutdown()-calling
  signal handlers can be concurrently executing in multiple threads.
  Now, in such a scenario, all uinet_shutdown() calls will complete
  and shutdown will be performed exactly once.

- A use-after-free hazard associated with the shutdown helper message
  is now avoided in exchange for a small memory leak at shutdown.

- The uhi_msg_*() routines, which may be called from signal handlers,
  and which call functions that might adjust errno, now preserve errno
  across their invocations.