Add API to support static linking on Windows

Note that `glib_init()`, `glib_deinit()` 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