Merge pull request #3168 from libgit2/cmn/config-tx Locking and transactional/atomic updates for config