Lock the OS thread when acessing errors

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.
Merge pull request #41 from libgit2/cmn/threading

Lock the OS thread when acessing errors
Merge branch 'master' into custom_odb
update git2go to support latest libgit2 development commit (id: 66af84)
Merge branch 'catchupTo66af84' into custom_odb

Conflicts:
	git.go
	reference.go
	repository.go
	submodule.go
add OdbBackend.Free() and the C it wraps; go fmt odb.go