ztest: fix -o by calling set_global_var in child processes
Without set_global_var() in the child processes the -o option provides
little use.
Before this change set_global_var() was called as a side-effect of
getopt processing which only happens for the parent ztest process.
This change limits the set of options that can be set and makes them
available to the child through ztest_shared_opts_t.
Future work: support arbitrary option count and length.
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Christian Schwarz <me@cschwarz.com>
Closes #11602