Support diff.context config
Make tree to tree diffs case sensitive

When case insensitive tree iterators were added, we started reading
the case sensitivity of the index to decide if the tree should be
case sensitive.  This is good for index-to-tree comparisons, but
for tree-to-tree comparisons, we should really default to doing a
case sensitive comparison unless the user really wants otherwise.
Add configs to repo config cache

This adds a bunch of additional config values to the repository
config value cache and makes it easier to add a simple boolean
config without creating enum values for each possible setting.

Also, this fixes a bug in git_config_refresh where the config
cache was not being cleared which could lead to potential
incorrect values.

The work to start using the new cached configs will come in the
next couple of commits...
Use config cache where possible

This converts many of the config lookups that are done around the
library to use the repository config cache.  This was everything I
could find that wasn't part of diff (which requires a larger fix).
Clear repo config cache when cfgs are set

This is a conservative change, but it seemed like the only safe
thing to do -- i.e. clear the cvar cache when a config gets set.
Improve diff config options handling

This makes diff use the cvar cache for config options where
possible, and also adds support for a number of other config
options to diff including "diff.context", "diff.ignoreSubmodules",
"diff.noprefix", "diff.mnemonicprefix", and "core.abbrev".

To make this natural, this involved a rearrangement of the code
that allocates the diff object vs. the code that initializes it
based on the combination of options passed in by the user and
read from the config.

This commit includes tests for most of these new options as well.
Make sure diff output is cleared on error
Merge pull request #1499 from arrbee/fix-diff-config-usage

Support more diff config options and use the config cache more