While Go will assign the correct type to a const block when it
auto-creates the values, assigning makes the const be typeless and will
only gain it in each particular use.
Make each constant in the blocks have an assigned type.
Following the cleanup from libgit2, let's not use 'oid' unless we mean
the name of the data type. In the other cases, we mean an identifier,
hence the name 'id'.
The library stores error information in thread-local storage, which
means we need to make sure that the Go runtime doesn't switch OS
threads between the time we call a function and th time we attempt to
retrieve the error information.