message: Get rid of DetectShutdownThread
  Reduces the thread-stack size and in turn saves a (small) bit of memory.
diff: static bool fDaemon;
  -void DetectShutdownThread(boost::thread_group* threadGroup)
  +void WaitForShutdown(boost::thread_group* threadGroup)
  {
  bool fShutdown = ShutdownRequested();
  // Tell the main threads to shutdown.
  @@ -64,7 +64,6 @@ bool AppInit(int argc, char* argv[])
  {
  boost::thread_group threadGroup;
  CScheduler scheduler;
  - boost::thread* detectShutdownThread = NULL;
  bool fRet = false;
  @@ -149,7 +148,6 @@ bool AppInit(int argc, char* argv[])
  #endif
  SoftSetBoolArg("-server", true);
  - detectShutdownThread = new boost::thread(boost::bind(&DetectShutdownThread, &threadGroup));
  fRet = AppInit2(threadGroup, scheduler);
  } catch (std::exception& e) {
  PrintExceptionContinue(&e, "AppInit()");
  @@ -158,19 +156,12 @@ bool AppInit(int argc, char* argv[])
  }
  if (!fRet) {
  - if (detectShutdownThread)
  - detectShutdownThread->interrupt();
  -
  Interrupt(threadGroup);
  // threadGroup.join_all(); was left out intentionally here, because we didn't re-test all of
  // the startup-failure cases to make sure they don't result in a hang due to some
  // thread-blocking-waiting-for-another-thread-during-startup case
  - }
  -
  - if (detectShutdownThread) {
  - detectShutdownThread->join();
  - delete detectShutdownThread;
  - detectShutdownThread = NULL;
  + } else {
  + WaitForShutdown(&threadGroup);
  }
  Shutdown();
  