Rewrite fatal error handling and shutdown.

 - The fatal error dialog is now a panel that displays
   over the main window
 - The main window remains open and the log is updated
   with the current status while waiting for worker
   threads to terminate.