Add a shared library for UI components needed by plugins.

This should hopefully make the export situations much more sane, let's see
if the Windows CI agrees.