gmain: Close race condition in _g_main_wake_up_all_contexts()
gmain: Close race condition in _g_main_wake_up_all_contexts()

Running gthread/tests/spawn-multithreaded in a loop, I very easily hit:

GLib-CRITICAL **: g_main_context_wakeup: assertion `g_atomic_int_get (&context->ref_count) > 0' failed

Testing the refcount still left a window where we would fall into the
assertion.  Fix this by just locking the context.

iConsole/Console-OS_external_bluetooth_glib,pstglia/external-bluetooth-glib,johne53/MB3Glib,djdeath/glib,antono/glib,cosimoc/glib,Distrotech/glib,pstglia/external-bluetooth-glib,endlessm/glib,iConsole/Console-OS_external_bluetooth_glib,Distrotech/glib,MathieuDuponchelle/glib,tchakabam/glib,01org/android-bluez-glib,MathieuDuponchelle/glib,MathieuDuponchelle/glib,pstglia/external-bluetooth-glib,gale320/glib,krichter722/glib,mzabaluev/glib,pstglia/platform-external-bluetooth-glib,ieei/glib,cosimoc/glib,johne53/MB3Glib,tchakabam/glib,Distrotech/glib,endlessm/glib,endlessm/glib,justinkb/aosp-bluez.glib,cosimoc/glib,cention-sany/glib,pstglia/platform-external-bluetooth-glib,djdeath/glib,johne53/MB3Glib,ieei/glib,zsx/glib,ieei/glib,justinkb/aosp-bluez.glib,lukasz-skalski/glib,mzabaluev/glib,tchakabam/glib,antono/glib,krichter722/glib,MathieuDuponchelle/glib,lukasz-skalski/glib,bluez-android/glib,01org/android-bluez-glib,gale320/glib,krichter722/glib,tamaskenez/glib,cention-sany/glib,Distrotech/glib,cosimoc/glib,cention-sany/glib,tchakabam/glib,justinkb/aosp-bluez.glib,cention-sany/glib,tamaskenez/glib,mzabaluev/glib,gale320/glib,djdeath/glib,darren-clark/android_platform_external_bluetooth_glib,johne53/MB3Glib,darren-clark/android_platform_external_bluetooth_glib,bluez-android/glib,antono/glib,mzabaluev/glib,johne53/MB3Glib,pstglia/platform-external-bluetooth-glib,bluez-android/glib,iConsole/Console-OS_external_bluetooth_glib,01org/android-bluez-glib,zsx/glib,mzabaluev/glib,lukasz-skalski/glib,01org/android-bluez-glib,iConsole/Console-OS_external_bluetooth_glib,pstglia/platform-external-bluetooth-glib,01org/android-bluez-glib,antono/glib,endlessm/glib,tchakabam/glib,cention-sany/glib,lukasz-skalski/glib,lukasz-skalski/glib,tamaskenez/glib,cosimoc/glib,justinkb/aosp-bluez.glib,gale320/glib,darren-clark/android_platform_external_bluetooth_glib,djdeath/glib,pstglia/platform-external-bluetooth-glib,darren-clark/android_platform_external_bluetooth_glib,endlessm/glib,pstglia/external-bluetooth-glib,ieei/glib,krichter722/glib,bluez-android/glib,bluez-android/glib,gale320/glib,zsx/glib,darren-clark/android_platform_external_bluetooth_glib,krichter722/glib,zsx/glib,pstglia/external-bluetooth-glib,justinkb/aosp-bluez.glib,tamaskenez/glib,djdeath/glib,Distrotech/glib,johne53/MB3Glib,MathieuDuponchelle/glib,ieei/glib,iConsole/Console-OS_external_bluetooth_glib,tamaskenez/glib