cli: Remove alt_getopt and use stdlib's OptParse

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Override default --help handler

By default, std.OptParse handles --help which displays the help text followed
by os.exit(). This causes the entire shell to close.

If the command has a "parser", we register our own handler for --help and then
parse the arguments before executing it. In that case, since we already parse
the arguments, we also override the parse function with our own that returns
the already parsed result.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>