[gsignal] Fix closure invalidation
[gsignal] Fix closure invalidation

If the closure is invalidated we drop the ref on the signal handler
node, but if the signal is currently being dispatched, the ref could be
held elsewhere.

Flag that we no longer have an outstanding invalidation handler so that
we don't try to unregister ourselves when the other ref drops.

Add a testcase that catches this situation.

ieei/glib,cention-sany/glib,endlessm/glib,tamaskenez/glib,johne53/MB3Glib,tamaskenez/glib,MathieuDuponchelle/glib,gale320/glib,gale320/glib,ieei/glib,lukasz-skalski/glib,cention-sany/glib,gale320/glib,cosimoc/glib,tchakabam/glib,djdeath/glib,tchakabam/glib,lukasz-skalski/glib,tamaskenez/glib,lukasz-skalski/glib,cention-sany/glib,krichter722/glib,lukasz-skalski/glib,Distrotech/glib,cention-sany/glib,krichter722/glib,ieei/glib,endlessm/glib,endlessm/glib,Distrotech/glib,krichter722/glib,tchakabam/glib,mzabaluev/glib,ieei/glib,Distrotech/glib,djdeath/glib,johne53/MB3Glib,cosimoc/glib,mzabaluev/glib,cosimoc/glib,krichter722/glib,johne53/MB3Glib,gale320/glib,MathieuDuponchelle/glib,MathieuDuponchelle/glib,mzabaluev/glib,mzabaluev/glib,tamaskenez/glib,djdeath/glib,tchakabam/glib,johne53/MB3Glib,krichter722/glib,tamaskenez/glib,cosimoc/glib,gale320/glib,MathieuDuponchelle/glib,endlessm/glib,djdeath/glib,Distrotech/glib,mzabaluev/glib,johne53/MB3Glib,djdeath/glib,Distrotech/glib,endlessm/glib,MathieuDuponchelle/glib,tchakabam/glib,johne53/MB3Glib,cosimoc/glib,ieei/glib,lukasz-skalski/glib,cention-sany/glib