fix warnings about repeated use of weak references

* GTObjectDatabase is a false positive - applied "workaround"
* GTConfiguration could actually crash when git_remote_list was called with a NULL pointer
* GTReflog could crash as well