Introduce git_oid_compare, an exported oid cmp
Fix fragile git_oid_ncmp

git_oid_ncmp was making some assumptions about the length of
the data - this shifts the check to the top of the loop so it
will work more robustly, limits the max, and adds some tests
to verify the functionality.
Add git_oid_strcmp and use it for git_oid_streq

Add a new git_oid_strcmp that compares a string OID with a hex
oid for sort order, and then reimplement git_oid_streq using it.
This actually should speed up git_oid_streq because it only reads
as far into the string as it needs to, whereas previously it would
convert the whole string into an OID and then use git_oid_cmp.
Make git_oid_cmp public and add git_oid__cmp
Standardize cast versions of git_object accessors

This removes the GIT_INLINE versions of the simple git_object
accessors and standardizes them with a helper macro in src/object.h
to build the function bodies.
Add new src/oid.h
Some cleanups

Removed useless prototype and renamed object typecast functions
declaration macro.
refspec: add direction accessor
remote: add resfpec list accessors

Bring back a way of acessing the git_refspec* from a remote.

Closes #1514
remote: fix a leak when dwim'ing refspecs
Catch issue in config set with no config file

This prevents a segfault when setting a value in the config of a
repository that doesn't have a config file.
Merge pull request #1522 from arrbee/repo-open-with-no-config

Catch issue in config set with no config file
Merge pull request #1520 from carlosmn/nth-refspec

Add refspec list accessors
Merge pull request #1518 from arrbee/export-oid-comparison

Remove most inlines from the public API
object: Explicitly define helper API methods for all obj types
object: haha
Reorganize diff code into functions

In preparation for more changes to the internal diff logic, it
seemed wise to split the very large git_diff__from_iterators into
separate functions that handle the four main cases (unmatched old
item, unmatched new item, unmatched new directory, and matched
old and new items).  Hopefully this will keep the logic easier to
follow even as more cases have to be added to this code.
Update diff handling of untracked directories

When diff encounters an untracked directory, there was a shortcut
that it took which is not compatible with core git.  This makes
the default behavior no longer take that shortcut and instead look
inside the untracked directory to see if there are any untracked
files within it.  If there are not, then the directory is treated
as an ignore directory instead of an untracked directory.  This
has implications for the git_status APIs.
More tests for diff untracked directories

This includes more tests for various scenarios when diff includes
an untracked directory in the workdir with contents either ignored
or not.
Update comment for clarity