Simplify the state configuration type and functions. Add a configuration option for automatically registering types.
Fix the unit tests to use NewConfig instead of NewStateConfig.