Init the global state
This function must be called before any other libgit2 function in order to set up global state and threading.
This function may be called multiple times - it will return the number of times the initialization has been called (including this one) that have not subsequently been shutdown.
the number of initializations of the library, or an error code.