Some coverity inspired cleanups
Increase use of config snapshots

And decrease extra reload checks of config data.
Merge pull request #2349 from libgit2/rb/coverity-fixes

Increase config snapshot usage