Fixed race condition in IOSwitchboard for ATTACH_CONTAINER_INPUT call.
Fixed race condition in IOSwitchboard for ATTACH_CONTAINER_INPUT call.

Previously, IOSwitchboard terminated itself after io redirect had
been finished and occasionally before an http response had been sent
to the agent for `ATTACH_CONTAINER_INPUT` request. This patch ensures
that termination of the IOSwitchboard server process does not occur
before input stream is closed and an HTTP response is send to the
writer.

Review: https://reviews.apache.org/r/65122/

dforsyth/mesos,reneploetz/mesos,kaysoky/mesos,gsantovena/mesos,abudnik/mesos,gsantovena/mesos,chhsia0/mesos,jpeach/mesos,reneploetz/mesos,Gilbert88/mesos,gsantovena/mesos,dforsyth/mesos,chhsia0/mesos,asamerh4/mesos,asamerh4/mesos,gsantovena/mesos,andschwa/mesos,reneploetz/mesos,kaysoky/mesos,gsantovena/mesos,Gilbert88/mesos,Gilbert88/mesos,jpeach/mesos,jpeach/mesos,reneploetz/mesos,kaysoky/mesos,gsantovena/mesos,asamerh4/mesos,kaysoky/mesos,reneploetz/mesos,jpeach/mesos,andschwa/mesos,abudnik/mesos,andschwa/mesos,chhsia0/mesos,abudnik/mesos,dforsyth/mesos,jpeach/mesos,andschwa/mesos,abudnik/mesos,abudnik/mesos,chhsia0/mesos,andschwa/mesos,asamerh4/mesos,reneploetz/mesos,Gilbert88/mesos,asamerh4/mesos,chhsia0/mesos,abudnik/mesos,Gilbert88/mesos,dforsyth/mesos,jpeach/mesos,asamerh4/mesos,dforsyth/mesos,jpeach/mesos,dforsyth/mesos,reneploetz/mesos,Gilbert88/mesos,kaysoky/mesos,asamerh4/mesos,gsantovena/mesos,chhsia0/mesos,andschwa/mesos,chhsia0/mesos,abudnik/mesos,kaysoky/mesos,kaysoky/mesos,dforsyth/mesos,andschwa/mesos,Gilbert88/mesos