context: Clear toggle queue whenever a GC is scheduled

It seems that occasionally when using a GFileMonitor, toggle queue
notifications will arrive on a separate thread and get queued, faster
than they can be processed.

This ensures the toggle queue is drained every time we finish executing
JS code, which will hopefully make such a pile-up less likely.

Closes: #297
17 jobs for 297-prevent-accumulating-toggles in 7 minutes and 13 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Source Check
passed #849965
build_recommended

00:02:53

passed #849867
cppcheck

00:00:44

passed #849966
cpplint

00:01:05

passed #849869
iwyu

00:00:55

failed #849866
build_recommended

01:18:59

failed #849868
cpplint

01:18:59

 
  Test
passed #849871
build_maximal

00:03:23

passed #849872
build_minimal

00:01:11

passed #849870
asan
sanitizer_gcc

00:01:04

 
  Manual
manual #849873
allowed to fail manual
coverage
manual #849876
allowed to fail manual
installed_tests
manual #849874
allowed to fail manual
iwyu-full
manual #849875
asan allowed to fail manual
sanitizer_clang
manual #849877
allowed to fail manual
valgrind
manual #849880
allowed to fail manual
zeal_11
manual #849878
allowed to fail manual
zeal_2
manual #849879
allowed to fail manual
zeal_4