Allow empty config object and use it

This removes assertions that prevent us from having an empty
git_config object and then updates some tests that were
dependent on global config state to use an empty config before
running anything.
Merge pull request #1382 from arrbee/fix-diff-patch-a-different-way

Allow empty config object and use it for tests