gtype: Implement cleanup of GType

Partially from patches from Ole André Vadla Ravnås, and Dan Winship

There are a lot of intertwined pointer references between
types, their vtables, and other bits. Free the memory for them
all together.

Note that we still do all finalization (ie: callbacks) per type
and module, in the relevant cleanup lists.

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gtype: Push registered GType onto the appropriate cleanup list

When G_CLEANUP_SCOPE is defined the G_DEFINE_TYPE and macros
properly push newly registered GTypes onto the cleanup list.

In addition push all the the basic types into the libgobject
cleanup list.

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gobject: Cleanup GObject class stuff

Initial work by: Dan Winship <danw@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gparam: Reliably free class info initialization closure

Otherwise we end up in a strange leak where static types leak
unless their class has been ref'd.

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gtype: Remove unneeded ref of static parent type

This causes a leak of the parent type.

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gtypemodule: Allow GTypeModule to be finalized

This is used by the cleanup code.

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gvalue: Cleanup global static data

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gobject: Don't leak pspecs for ininstantiated interfaces

Remove the awkward ownerhsip of pspec by the object. pspecs are
now only owned by the pool, which makes things more predictable.

https://bugzilla.gnome.org/show_bug.cgi?id=711778
param: Avoid g_test_add_data_func_full() which leaks

It leaks on tests that have not been run. This is the case when
the g_test_subprocess mechanics are in use.

https://bugzilla.gnome.org/show_bug.cgi?id=711778
dynamictype: Fix leak in test

https://bugzilla.gnome.org/show_bug.cgi?id=711778
tests/gobject: Use cleanup for types defined in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711778
gio: Define cleanup scope and list for libgio

https://bugzilla.gnome.org/show_bug.cgi?id=711799
gdbus: Cleanup global static data

https://bugzilla.gnome.org/show_bug.cgi?id=711799
gioenumtypes: Push enum GTypes onto cleanup list

https://bugzilla.gnome.org/show_bug.cgi?id=711799
giomodule: Cleanup global data

https://bugzilla.gnome.org/show_bug.cgi?id=711799
giomodule: Allow overriding source directory gio modules are loaded from

When testing (and valgrinding) we need to have a known set of modules
loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=711801
glocalfile: Cleanup global data

https://bugzilla.gnome.org/show_bug.cgi?id=711799
gresolver: Cleanup global data

https://bugzilla.gnome.org/show_bug.cgi?id=711799
gsocketconnection: Cleanup global data

https://bugzilla.gnome.org/show_bug.cgi?id=711799
gtask: Cleanup thread pool

https://bugzilla.gnome.org/show_bug.cgi?id=711799