mavlink stream: do not use getopt as it leads to problems with the global optarg variable

@DrTon please review and merge into beta_mavlink2 if you agree