Symptoms: phosh test case the involves building the meta data cache segfaults sporadically when built with clang.
Details: https://gitlab.gnome.org/World/Phosh/phosh/-/issues/1240
Backtrace: https://gitlab.gnome.org/-/project/16747/uploads/bcccb0e53f4315a7b0027b7e1adf1130/backtrace-all-threads-2.txt
As far as I can tell we're cancelling correctly but it seems as_pool_update_desktop_entries_table is not being terminated. I think
as_pool_load_thread needs to call g_task_set_return_on_cancel`. @ximion if that makes sense I could look at a fix.