Create a workaround for tests and GTask
It's possible that a GTask that has been called with
g_task_run_in_thread()
still has a reference held by that thread after
the _finish()
function has been called. This is a little problematic
for tests that check for the final reference, so use this as a
workaround instead.
See glib#1346 for more info