Add initial breakout of telnetd support, incl. commands
Switch to single event handler in driver code.
This resyncs us with libkakapo mainline
Various changes, mostly around getting telnetd working.