oid: Export `git_oid_tostr_s` instead of `_allocfmt`

The old `allocfmt` is of no use to callers, as they are not able to free
the returned buffer. Export a new API that returns a static string that
doesn't need to be freed.
Merge pull request #2528 from libgit2/vmg/tostr_s

Export `git_oid_tostr_s` instead of `_allocfmt`