Properly close the command when the connection closes unexpectedly.

We are seeing a lot of stale git processes on Drupal.org. This is likely because the daemon doesn't properly kill the daemon when the connection closes unexpectedly.

This (COMPLETELY UNTESTED) pull request handles three cases:

- eofReceived(): we receive an EOF on the SSH channel, we need to
  close the stdin of the process and let it deal with that.
- closed(): the connection is closed, we need to kill the process
- the connection is closed while we were (asynchronously)
  authenticating: we need to not open the process.

Most of the code is taken straight from `twisted.conch.unix`.