calls to `dlclose`/`FreeLibrary` are unchecked
dlclose (on Linux) or FreeLibrary (on Windows) can fail under certain circumstances, but our plugin routines (in PlugLoad-posix.cpp and PlugLoad-windows.cpp) do not check the return value of dlclose/FreeLibrary.
The known circumstance in which dlclose will fail on Linux is if the DLL contains any symbols marked STB_GNU_UNIQUE; if a segment contains any such symbol, that segment is marked NODELETE by the loader, which prevents the dll from being unloaded. g++ will emit symbols with this flag for, among possibly other things, templated statics and statics inside of inline functions.
In order to prevent user surprise, then, we should detect whether DLL unload fails, and when it does issue an appropriate diagnostic, and mark the plugin as "broken" instead of as "unloaded".