Merge pull request #4916 from libgit2/ethomson/backport_0278 smart transport: only clear url on hard reset