[dirty] Introduce the new plugin system.

Work on this has been going on since forever.
While it is in a working state, it's not at all clean right now.