More robust plugin tracking
The following discussion from !290 (merged) should be addressed:
My thinking is more along the lines of having plugin loading pull an exported
struct weston_pluginconst data struct from the DSO, which would have
init(with init returning a user_data variable which is used to reference the plugin internally) and
teardownmembers, as well as optionally things like names and whatever. Each
weston_compositorcould then track those plugins in a list, and call teardown automatically, or plugins could call an unregister function at any time which would remove them from the list.
That would remove the requirement for plugins to set their own teardown listener.