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.
Merge pull request #1518 from arrbee/export-oid-comparison

Remove most inlines from the public API