When generating introspection data, we instantiate types without
calling gtk_init, so make sure that extension points are registered
before the type is trying to implement them.
We are creating these using g_object_new, so the _new function is never
called, resulting in a NULL mb_charset. Fix this by moving the
initialisation into the _init function.
gtk_im_context_set_client_widget() allows passing NULL as widget to signal that
the widget no longer exists. The xim implementation didn't handle that
case which led to the test suite on gitlab-ci failing.