Use memcmp() in git_oid_cmp() instead of DIY.

It means less code. It should also allow compilers to recognize
what is done here enabling optimizations with less efforts.