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.
Minor fix for cmn/clone-into-mirror.

A recently added check might skip initialization of old_fetchhead and go
directly to cleanup. So, destruct in the opposite order of construction.
Merge pull request #2373 from kitbellew/fix-clone-into-mirror

Minor fix for cmn/clone-into-mirror.
Merge pull request #2372 from libgit2/cmn/fetch-terminate

smart: send a flush when we disconnect