MAPREDUCE-2202. Generalize CLITest structure and interfaces to facilitate upstream adoption (e.g. for web or system testing). Contributed by Konstantin Boudnik