Add support for plugins

Add support to framework to allow plugins that can attach to system by
use of events without changing it.
Event logging plugin

Move event logging from framework structure to external plugin
Add 'Debug' switch

Allow to debug messages to be reported in the browser
Add static 'logFile' property
Delete unused contant