Replaces logging with slf4j and SocketAppenders

Merge of the excellent work by @remen and @jwestberg.