Move GC code from gracelib to gracelib_gc.

Also moved shared types to gracelib_types.h.
Added pthread flag to CFLAGS in all GCC calls.

Flag added to Makefiles and genc module.
Added forgotten include to curl.c.

Forgot to include the gracelib_gc.h header leader to gcc warnings.
Added locks around GC.

Two mutexes are added: one for the glalloc/glfree functions, and one for
the gc_* functions.

Also removed the rungc and expand_living from the gracelib_gc header
file. They are internal and not meant to be used manually (and should be
called with the GC lock held).
Moved ClassData initialisers to their own fns.

Also started adding locks around shared structures.
Moved ClassData initialisation to gracelib init.

The constant global ClassData variables are now initialised in the
single threaded gracelib_argv function.
This will make threading easier, as there is no longer any need to lock
around accesses to those variables.