Add rudimentary tests for CommandResult.

These mainly only test the high-level.  The constructor is not directly
exercised, but this shouldn't be much of a problem.