Format a gid_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 free().