Add API to unload plugin module
This is a workaround for a very complicated bug. When you have more than
one ChimaraGlk widget opening the same plugin, then g_module_open()
doesn't dlopen() the plugin again; instead, it just adds a reference to
the open module.
This means that all static variables in the module are not reinitialized
when the Glk program starts running in the second ChimaraGlk widget.
This problem needs to be solved either by eliminating the static
variables from the plugins, or making sure that different ChimaraGlk
widgets open their plugins separately.
This commit does the latter, by adding API to unload the plugin module
(chimara_glk_unload_plugin()) so that ChimaraGlk widgets that run the
same program but not at the same time have the option to unload the
plugin in one widget before loading it in the other. Specifically, this
is the use case of Inform 7.
This does not fix the use case where two separate ChimaraGlk widgets
want to run the same program at the same time.