context: Shut down toggle queue before dispose notify

This adds a method to shut down the toggle queue so that it doesn't
accept any more toggles. This is intended to stop toggles happening that
are queued from other threads while the GjsContext dispose sequence has
already entered its final garbage collection.

We clear pending toggles and shut down the toggle queue before chaining
up in GjsContext's dispose function. Sending out dispose notifications
causes all GjsMaybeOwned instances to unroot themselves, which means that
toggles don't have much meaning after that point.

Closes #26.
9 jobs for 26-toggle-race-condition in 15 minutes and 37 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Static Analysis
passed #8208
cppcheck

00:00:27

failed #8198
cppcheck

00:01:43

failed #8193
cppcheck

00:01:44

failed #8186
cppcheck

00:01:46

 
  Build
failed #8188
allowed to fail
fedora_clang

00:00:13

passed #8187
fedora_gcc

00:02:47

 
  Thorough Tests
passed #8189
coverage

00:11:52

 
  Failure
passed #8209
on_failure

00:00:16

failed #8190
on_failure

00:00:13

 
Name Stage Failure
failed
fedora_clang Build
-- Set Environment --
cp: cannot stat '/cwd/.cache': No such file or directory
Uploading artifacts...
WARNING: /builds/ptomato/gjs/.cache/jhbuild/build/gjs/test-suite.log: no matching files
WARNING: /builds/ptomato/gjs/.cache/jhbuild/build/gjs/config.log: no matching files
WARNING: /builds/ptomato/gjs/.cache/jhbuild/build/gjs/Makefile: no matching files
/builds/ptomato/gjs/coverage/: found 3 matching files

Uploading artifacts to coordinator... ok
id=8188 responseStatus=201 Created token=5_ztmEUy
ERROR: Job failed: exit code 1