redesign: reworked cache cmd to use the new stuff and to match digest cmd

Just a bunch of cleanups and rewirings - no new behavior, just better
implementation.  Also, I moved the run tests to a system test since
that better characterizes the nature of the tests.

@jcredding ready for review.