Rewrite cmd_quit in preparation for converting to core modules.

- Configuration is now stored in the module rather than the core.
- OperQuit extension is now registered by the module instead of the core.
Rewrite cmd_part in preparation for converting to core modules.

- Configuration is now stored in the module rather than the core.