Config: add a type or helper for range-restricted variables
Very frequently we want to have a config type that is "int, restricted to some range of values". We should have a means to represent that, and thereby save a bunch of boilerplate code.
This could be done with new var_type_def_t for each range, but that could get out of hand. Probably we want a way to add more info to the config_var_t.