Increment reference counter in git_repository_set_config

This fixes #1365

When a config is attached to a repository, the repository becomes the config's owner. When the repository is freed, this ownership vanishes and the config has to manage it's lifetime by it self again. However, if we do not increase the reference count when attaching, the reference count is mismatched after freeing the repository.