initial ideslave
minor cleanups
do IO in processInput rather than in process

This is a first step to use the process function for
the ideslave as well.
use process in ideslave loop
catch errors during receive and report them
make this a bit more useful, and use same protocol as emacs side :)