gtype: Add check for fundamental instance type

When checking whether an instance is of a given fundamental type (such
as G_TYPE_OBJECT), we can avoid over 60%+ of the cost of checking types.

https://bugzilla.gnome.org/show_bug.cgi?id=730984
gobject: Use fast fundamental instance type check

Speeds up g_object_ref/_unref by 50%-65% (i.e. takes 60-65% of the time
it used to take).

https://bugzilla.gnome.org/show_bug.cgi?id=730984
GParamSpec: Use new fundamental instance check

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