Handle GError, import changes from opendylan, gobject-glue as a module

This allows us to use the functions who throws errors.

The gobject-glue change makes it easier to integrate it into gobject.