Module cleanup (part 1)
Module cleanup (part 2).

Module Doorman in Module namespace. Inherits from BaseModule.
ModuleManager cleanup.

ModuleManager code is a better and more consistent.
Fix Leosac shutdown.

Log socket (in main thread) was being delete too soon.
Fixing this by wrapping its deletion in a helper struct.
Cleanup part 3.

Fix the start/stop code. Cleanup module code.