Use int32 instead of int for internal callbacks.

I had wrongly assumed that the C int definition was close enough to Go's to be interchangable for the range of values we were using.  32- and 64-bit platforms both for Linux and OS X use 32-bit ints where we care about them, so we change the callbacks to match, and continue to use ints in the public-facing API to not break anything.