[WIP] Refactor plugin system

This supersedes #1335, using funcrefs instead of autocommands to implement providers(it is cleaner and requires less changes).

If the new provider architecture enabled this separation from python-client, that's a very good sign IMO. I like it.