Fixed taint. Added EventManager. Consolidated db/config

Taint was caused by class system. Implemented custom class system
(basic).

Added EventManager class which allows classes to register an handler
function for events, managed in a central location.

Consolidated Database/Config system because it made more sense to merge
them.

Added various utility function such as colorize_string,
merge_tables_with_override.

Implemented debug messaging system which allows a global config option
to specify whether to show debug messages, and if so which classes to
show them for.