Improve error propogation in checkout
Introduce status/diff TYPECHANGE flags

When I wrote the diff code, I based it on core git's diff output
which tends to split a type change into an add and a delete.  But
core git's status has the notion of a T (typechange) flag for a
file.  This introduces that into our status APIs and modifies the
diff code so it can be forced to not split type changes.
Fix checkout to know about TYPECHANGE diffs
Cleanup TYPECHANGE support

This is just some cleanup code, rearranging some of the checkout
code where TYPECHANGE support was added and adding some comments
to the diff header regarding the constants.
Test data with lots of type changes
Add complex checkout test and then fix checkout

This started as a complex new test for checkout going through the
"typechanges" test repository, but that revealed numerous issues
with checkout, including:

* complete failure with submodules
* failure to create blobs with exec bits
* problems when replacing a tree with a blob because the tree
  "example/" sorts after the blob "example" so the delete was
  being processed after the single file blob was created

This fixes most of those problems and includes a number of other
minor changes that made it easier to do that, including improving
the TYPECHANGE support in diff/status, etc.
Move enum comments next to actual values
Separated git_strarray from common.h.  Added doxy comments.
Incremental improvements to pack-objects logic
Incorporate feedback for incr. improvements to pack-objects
Merge pull request #988 from pwkelley/pack-objects

Incremental improvements to pack-objects logic
Skip submodule checkout pass if no submodules

Skip the third pass of checkout (where submodules are checked out)
if the earlier passes found no submodules to be checked out.
Merge pull request #972 from PaulThompson/separate_strarray

Separated git_strarray from common.h.  Added doxy comments.
Fix minor bugs

Fixed no-submodule speedup of new checkout code.  Fixed missing
final update to progress (which may go away, I realize).  Fixed
unused structure in header and incorrect comment.
Merge pull request #968 from arrbee/diff-support-typechange

Support TYPECHANGE records in status and adjust checkout accordingly
Fix adding variable to config file with no trailing newline

This can occur after a manual modification of a config file.
Add config_level_t support in the config API

Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found.

Support to `git_config_foreach` and `git_config_foreach_match`
Support to `git_config_add_file` and `git_config_add_file_ondisk`
Support to `git_config_delete`
Add `git_config_get_config_entry`
Support to `git_config_get_multivar`
Add `git_config_set_xxx_in_level`
Add `git_config_get_xxx_from_level`
Add `git_config_get_mapped_from_level`
Expose parsing functions (`git_config_parse_bool`, `git_config_parse_int32`, `git_config_parse_int64`, `git_config_lookup_map_value`)
Add 'force' parameter to `git_config_add_file` and `git_config_add_file_on_disk`
Add for `git_config_set_multivar_in_level`
Change behavior of `git_config_set_multivar` (only acts on local config files now, instead of all files)

We are now storing `git_config_entry`s in the khash of the config_file