Refactoring chat functions into smart plugins
The various chat callback functions have been refactored into three smart plugin modules: welcome, dialogue and tor_browser.
Additionally, there are no longer global variables for the SQLite3 connection and cursor. There are no more long-lived cursor objects and the connection object is stored in a singleton Database class.
The configuration data has also been moved to its own module to avoid circular imports.