Consolidated CLI code into cli module.

Also added client_dev and server_dev shims to make it easier to
develop these programs.
Merge branch 'cleanup' of github.com:jeromekelleher/server into cleanup