Automatic plugin installation prototype

This code is ready to merge in, but that's not expected. This is just a good place to show the diff and get comments. If we decide to go with this prototype then I can push it myself.