Determine GSource priority of promise resolution
Currently we resolve promises in an idle handler which is queued whenever a promise job is ready to call its callback. We also resolve unconditionally after any
gjs_context_eval() call (which corresponds to the JS program finishing.)
The idle handler has priority
G_PRIORITY_DEFAULT_IDLE (200) and in GJS 1.48.x I've seen it get starved out when something else is spamming the main loop with expose events at
G_PRIORITY_DEFAULT (0). I have yet to confirm this in 1.50.x, but I assume it could still be a problem.
Determine whether the current priority is correct, and whether we should resolve promises at other times (after calling into JS from C?) or through another means (a custom