Fix typecheck_is_object/is_fundamental

We don't need to check if priv == NULL, the purpose of those
calls is only to check the JSClass. Additionally, we don't
need to throw an exception, do_base_typecheck() already does.

https://bugzilla.gnome.org/show_bug.cgi?id=725061
arg: don't check manually for interface prerequisites

g_type_is_a(interface, prerequisite) already does the expected thing,
we don't need a slow manual check.
Moreover, it's not documented, but add_prerequisite() always
resolves a GTypeInterface type into the instantiable prerequisites,
so g_type_interface_prerequisites() always returns instantiatable
types.

https://bugzilla.gnome.org/show_bug.cgi?id=725061
fundamental: assert that priv is not NULL if we are on the right JSClass

We don't have custom inheritance for fundamental types, so we don't
need to run JS code before the C object is constructed.

https://bugzilla.gnome.org/show_bug.cgi?id=725061
arg: fix cast checking for objects and fundamentals

We must make sure that all code paths successfully set the object
or throw an exception.

https://bugzilla.gnome.org/show_bug.cgi?id=725061
enumeration: add support for static methods

gobject-introspection has supported these for a while, and it
costs nothing for us to support them as well. In addition, it
makes a lot simpler to have documentation (because we can simply
skip all the backward compatibility functions)

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