Added basic running of plugins.

There is now code to pass a plugin a state and get a changed state
out over stdout.