Add a test for accessory config.
Split config into a module.

Config has no clear use independent of main, but it feels like they're
clearly distinct enough, and complex in different ways, that breaking
them up makes sense.