closing socket when recvthread fails and effectively removing rungc routing (which was a hack anyway)

Also using LineBuffering policy for stderr which helps a bit with the
concurrency over the stderr. Using a PIPE for stderr would solve this,
but this is debug anyway.