Fix GObject signal methods to work with new annotations

Add conditional support for signal methods annotated as gpointer
or GObject.Object. This is needed to work with newer versions of
glib which changed annotations to GObject.Object (bug #685387).

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