support abbreviated options in getopt_long
fix getopt handling of initial '+' in optstring

in the case where an initial '+' was passed in optstring (a
getopt_long feature to suppress argv permutation), getopt would fail
to see a possible subsequent ':', resulting in incorrect handling of
missing arguments.
accept null longopts pointer in getopt_long

this is an undocumented feature of GNU getopt_long that the BSD
version also mimics, and is reportedly needed by some programs.