added logger class to save dumped IRC events to a logfile.

put IRC callback functions into the connection class as private static methods.
the server class should also work with hostnames, not only ips.
some other bugfixes in connection class methods / replaced C code in
Callback functions with equivalent C++