clean up CLI/web error reporting, factor out 'sample' CLI dispatcher
web commands: handle unicode result strings correctly
move CommandError to a common location
complain about using the same invitation code twice at the same time
make dump-messages easier to use