Fix matching of methods named *_get_type()
The code which heuristically turned functions into class methods would always
ignore any function called *_get_type or *_get_gtype. However, the code which
looked for GI metadata functions to execute them was much more comprehensive,
checking not just the name, but also that it had no parameters and that it
returned a GType.
This change abstracts the more comprehensive check into the Function class, and
uses the same check in both places.
https://bugzilla.gnome.org/show_bug.cgi?id=671218