XX-10957:  Made doDaemonize static so it can be called early.  Added ability to set external config.