Use getopt_long().

Change-Id: I8ff74de7cedee64bc46d88f23a6d1e771d4a4a10
Reviewed-on: https://code.wireshark.org/review/6048
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit de8c81cd9235f97541db28b0eed6865bf3a6a291)
Reviewed-on: https://code.wireshark.org/review/6049