Only try to write to stdout/socket if (1) an immediate write hasn't written everything and (2) kqueue tells us it's OK to write.