fix closing stdin of spawned process

previously stdin was simply sent directly to the other side, but two things
are wrong with this:

1. the iodaemon spawner would still keep its end of the stdin open, so the
   subprocess would never have it close

2. it's impossible to distinguish between the link being killed and the link
   explicitly closing stdin

sending input from link to spawn is now done by explicitly sending input
messages over the connection. when the input is closed, an EOF message is
sent. otherwise, if the connection breaks normally, nothing happens.