binman: Convert to use ArgumentParser

This class is the new way to handle arguments in Python. Convert binman
over to use it. At the same time, introduce commands so that we can
separate out the different parts of binman functionality.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/run b/test/run
index b97647e..d635622 100755
--- a/test/run
+++ b/test/run
@@ -40,7 +40,7 @@
 export DTC=${DTC_DIR}/dtc
 TOOLS_DIR=build-sandbox_spl/tools
 
-run_test "binman" ./tools/binman/binman -t --toolpath ${TOOLS_DIR}
+run_test "binman" ./tools/binman/binman --toolpath ${TOOLS_DIR} test
 run_test "patman" ./tools/patman/patman --test
 
 [ "$1" == "quick" ] && skip=--skip-net-tests
@@ -52,7 +52,7 @@
 # To enable Python test coverage on Debian-type distributions (e.g. Ubuntu):
 #   $ sudo apt-get install python-pytest python-coverage
 export PATH=$PATH:${TOOLS_DIR}
-run_test "binman code coverage" ./tools/binman/binman -T --toolpath ${TOOLS_DIR}
+run_test "binman code coverage" ./tools/binman/binman test -T
 run_test "dtoc code coverage" ./tools/dtoc/dtoc -T
 run_test "fdt code coverage" ./tools/dtoc/test_fdt -T