Add API to support static linking

Note that `glib_[de]init()` and `glib_win32_thread_detach()` do
absolutely nothing unless GLib was compiled as a static library.
glib-genmarshal: Call `glib_init()` to support static linking