Fix crash on remote-viewer startup with gthread coroutine
Fix crash on remote-viewer startup with gthread coroutine

g_object_notify_main_context() was recently changed to automatically
detect whether we are running in the main context or not, and SpiceSession
is now using g_object_notify_main_context().

In order to achieve that, IN_MAIN_CONTEXT is used, but it's not safe
to be used before coroutine_init() is called. IN_MAIN_CONTEXT expands to
(coroutine_self()->caller == NULL), but coroutine_self() will be NULL when
using gthreads for the coroutine implementation until coroutine_init() has
been called.

Before coroutine_init() has been called, we'll always be running in the
main context, so we can just add a check for coroutine_self() != NULL to
IN_MAIN_CONTEXT to solve that issue.

SPICE/spice-gtk,elmarco/spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk,Fantu/spice-gtk,flexVDI/spice-gtk,guodong/spice-gtk,guodong/spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk,flexVDI/spice-gtk,Fantu/spice-gtk,Fantu/spice-gtk,elmarco/spice-gtk,SPICE/spice-gtk,guodong/spice-gtk,fgouget/spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk,Fantu/spice-gtk,guodong/spice-gtk,SPICE/spice-gtk,elmarco/spice-gtk,elmarco/spice-gtk,SPICE/spice-gtk,fgouget/spice-gtk,fgouget/spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk