[qtdocgallery] Fix assertion on construction.

Ensure g_init_type() is called before attempting to use any of the
tracker_sparql api.