add basic stuff to generalize IO
move these to use the mixed read/write routines
override stdin and stdout to be remote, stderr is untouched however

is this ok? some functions want to write a log there ...
several fixes to the new io stuff
increase stack to avoid overflow crash on SIGINT

but should actually check, maybe something is causing a recursive
stack exhaustion
fixed EOL transferred to the client side, fixed strftime fmt string

the windows telnet gets broken output when receiving no '\r'
use MSG_PEEK flag for recv() everywhere
more EOL fixes
increase default recv timeout to 30 seconds
add comment
improve server sock creation and support ipv6