cli: Add a new CLI wrapper

This new CLI wrapper introduces a command mode, like we are used from
Git for instance. The first argument specifies the command mode, which
is `memory` for the classic flashprog CLI. Alternatively to a first
argument, it can be called as `flashprog-cmd`. This will allow us to
add more CLI features that can be developed independently from the
classic CLI.

For instance, flashprog could then be called like this:

  $ flashprog memory -p ch341a_spi
  $ flashprog mem -p ch341a_spi

If no command mode is specified, we fall back to the classic CLI for
convenience. So this is also still possible:

  $ flashprog -p ch341a_spi

Change-Id: I98cb110b47ebce52daf2e0972fc4565ef9d40242
Signed-off-by: Nico Huber <nico.h@gmx.de>
diff --git a/cli_classic.c b/cli_classic.c
index 2f16ef6..26253dc 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -181,7 +181,7 @@
 	return true;
 }
 
-int main(int argc, char *argv[])
+int flashprog_classic_main(int argc, char *argv[])
 {
 	const struct flashchip *chip = NULL;
 	/* Probe for up to eight flash chips. */