main: clear optind before executing tool
main: clear optind before executing tool

Per the man page for getopt_long:
A  program that scans multiple argument vectors, or rescans
the same vector more than once, and wants to make use of GNU
extensions such as '+' and '-' at the start of optstring, or
changes the value of POSIXLY_CORRECT between scans, must
reinitialize getopt() by resetting optind to 0, rather than
the traditional value of 1.  (Resetting to 0 forces the
invocation of an internal initialization routine that
rechecks POSIXLY_CORRECT and checks for  GNU extensions in
optstring.)

Because of this, we clear optind in main.c, so tools need
not be bothered with this.

Signed-off-by: William Roberts <60148e894dabf0b83bde1d460768794cd453c455@intel.com>

01org/tpm2.0-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools