Resolve indefinite hang on stop without network

This resolves an issue where the application would nevery successfully
join the stratum thread if no network connection was present, causing the
app to become stuck in the stopping state indefinitely.
Resolves two start/stop issues

This resolves two issues in the start/stop cycle:
 - Receivers should be checked before attempting to unregister them, since
   attempting to unregister null will crash.
 - A race condition existed between starting the WaitForWorkers() task and
   when the logger thread state switches to terminated. This could result
   in the WaitForWorkers() immediately exiting, and user being able to hit
   the stop button twice. This is resolved by locking around application
   state changes.

This also resolves other miscellaneous formatting issues.