[WIP] Refresh git configuration before looking for the tracking branch redux.

Re submit of #2620.

@carlosmn I tried what you suggested in https://github.com/libgit2/libgit2/pull/2620#issuecomment-59332844 but it doesn't seem to be working. Maybe the input config is also read only? I don't really know what's going on in this code. :smile: