tests: add CLI dummy command-exec tool

This adds some common CLI testtool code as well as a tool that has a
bunch of commands to be poked for their correct processing.

The tool doesn't work correctly from a script at stdin at this point
because the vty code will throw away all buffered when it sees EOF, so
the tail end of the input file is lost.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/tests/.gitignore b/tests/.gitignore
index 1cb28c9..3002b27 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -29,6 +29,7 @@
 testbgpmpattr
 testbuffer
 testchecksum
+testcli
 testmemory
 testprivs
 testsegv