in irunner, don't send last newline if child is gone
in irunner, don't send last newline if child is gone

fixes an issue where irunner could send last newline after child exits, raising an OSError

ipython/ipython,ipython/ipython