move __builtin_expect definition from common.h to config.h
replace getopt from OpenBSD which has a 2-clause BSD license