gtask: Return cancelled tasks asynchronously
gtask: Return cancelled tasks asynchronously

Once cancelled, a GTask's callback should not only be invoked
asynchronously with respect to the creation of the task, but also with
respect to the GCancellable::cancelled handler. This is particularly
relevant in cases where the cancellation happened in the same thread
where the task is running.

Spotted by Dan Winship and Michael Catanzaro.

Closes https://gitlab.gnome.org/GNOME/glib/issues/1608

endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib