A struct plugin_hub_internals was falsely casted to struct
plugin_callback_data. This caused the contained commands list pointer to point to
a struct hub_info and commands->size took the value of a pointer to a struct
net_connection. Since size is increased/decreased every time an item is
added to/removed from the list, this resulted in some funny crashes.
This fix is a little dirty as it exports some internals.
Dynamic commands are user commands that can be added dynamically to
the hub by a plugin.
The example plugin (mod_example.c) adds a !example command that when
invoked send a message to the user who invoked it.
* Fix crash when unloading plugins.
* Fixed plugin loader and plugin unload handler.
* Added a new example plugin: mod_logging which logs users logging in and out of the hub to stdout.