config handling and tests

This brings in a config class and helpers.  It also defines the
basic config options and their defaults.