gitcfg: Guard against moved or deleted .gitconfigs
Users can actively move or rename files so guard against
this by calling reset() whenever the cache key changes.
The original code calculated the path list once at
startup and did not ever recalculate it. We now recalculate
the list whenever the stat info changes.
A subtle change here is that the old code would always
check $prefix/etc before checking /etc/gitconfig.
git always checks /etc/gitconfig regardless of $prefix
so we can remove that check.
Signed-off-by: David Aguilar <davvid@gmail.com>