Updates to cancellation logic during download and indexing of packfile.

This PR is to better support cancellation during indexing operations. These operations can take some time to complete. Also, this tweaks the logic during the download pack logic for the smart protocol to only clear the error string on user cancel, and move up the final network progress report to before writing the packfile. I believe this is the correct way for these particular cases (following the discussion in #1959).

I am still not completely sure of the cleanup logic in `git_indexer_commit` - I did not change this flow for this PR, I only propagated the error code.

/cc @ethomson @arrbee