Format a git_oid into a newly allocated c-string.
the oid structure to format
the c-string; NULL if memory is exhausted. Caller must deallocate the string with git__free().