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.