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

It means less code and it can be a hint for compiler what is done
here enabling easier optimizations.

Not sure if you like it though due to the inclusion of string.h.