Add support for the symref extension

If the remote supports the symref protocol extension, then it's able to tell us what its default branch is, saving us from guessing, possibly wrongly.

This also lets `git_clone()` make use of it, reducing its complexity by offloading to the remote.

This fixes #2006