move to consistent use of GNU_SOURCE and CONFIG_H

add header guards for inclusiong of config.h
include config.h everywhere
define GNU_SOURCE in config.h

Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>