Refactor config validation
Here's the signature for the callback for validating a configuration object:
typedef int (*validate_fn_t)(void*,void*,void*,int,char**);
This is not a great interface. For example, takes three copies of the configuration object. One is the object it's validating; one is the previous value of the object (to see if we're making a bad transition); and the last one is the default values for the object (to see if we have changed anything we weren't allowed to change).
We should divide this callback into separate pieces, and fix everything that users options_validate() directly to instead call a config_validate() wrapper function.