Added and simplified commands.

Added Exec method to handle command setup/teardown.  Pass func to
parseInput to handle errors so cli and tui can have different behavior.
Added depth, sum, and avg commands.
Added min and max commands.  Some refactoring.

Added 2- and n-ary min and max commands.  Split up some multiplexed
commands.