Process action from server

This implements a command line tool for running commands sent back from the server -- and wires that up internally to execute the synchronous command coming back.  While I think that is the wrong model, long term, this certainly implements sufficient behaviour to start doing the right thing with current commands.

(Well, OK, current *command*, since as far as I can tell only `reboot` is actually implemented.  That would work fine)

Currently, this is limited to only running commands without arguments, since the wire format doesn't support anything beyond that.  That should be fixed next.

Finally, it includes testing for the command line tool, and two bug fixes that slipped through because ad-hoc testing turns out to be very bad at finding out if you write code correctly.  That is a lesson I should stop relearning by this stage. ;)