Move the utilities/util_getopt.c implementation of getopt(3) into the
WiredTiger library, and convert all of the utilities and test programs
to use it.
gcc doesn't like externs inside functions (warning: nested extern
declaration ofXXX)
Clean up remaining gcc warnings.