smart: send a flush when we disconnect

The git server wants to hear a flush from us when we disconnect,
particularly when we want to perform a fetch but are up to date.
Merge pull request #2372 from libgit2/cmn/fetch-terminate

smart: send a flush when we disconnect