Hopefully cope with Go 1.0 and Go 1.1

Go 1.1 has changed the way that functions work - basically, we have to
point at a pointer to the actual code.  Since we don't really want to
maintain different versions of the code for 1.0 & 1.1 - we use runtime
detection to figure out whether the indirection is needed.
go fmt
Make sure that the runtime knows about indirections

We want to keep these indirections, which means that the Go runtime
needs to know that we are holding references to them.  It won't look
at the contexts structs, because they are C types and so opaque to the
runtime - so we need to store them separately in a way the runtime
will see them.
Unit testing wip
Fix memory leaks in the variable argument BaseObject.Call* methods
Count how many times the goroutine has been locked to the os thread.
Otherwise we prematurely release the goroutine from the os thread
resulting in a crash, as the GIL locking mechanisms allow reentrance.
Fix import path
Add Finalize
Fixes for "function declaration isn't a prototype"
Fix lock.go to compile with Go 1.0

Refactor the code to be easier to read whilst we're at it.

Also fix a typo in a comment.
to export functions with cgo, they must be public
gccgo + cgo can't call static inline functions
Remove Finalize from the tests

Running Finalize in the tests means that sometimes the Initialize
takes forever ... so let's not do that.
Fixed method calling

Conflicts:
	lib/class.go

Only the test changes are now relevant ...
Remove log from test

Didn't really add anything useful ...
Added SetInterrupt + test
Fix import
Merge branch 'master' into ext
Updates to work with latest code from master

In particular utils.[ch] now contains a lot of stuff that we were
previously duplicating.
Fix typo