Refactor all the startup stuff in config.c, with dependencies in mind
Motivated by #21974 (moved): """ We sure have a bunch of stuff we do at startup now, and the dependency graph of what has to happen before what is complicated, and I bet there are bugs in the current order of things. It would be a swell project for somebody to make a list of all the things we do at startup, and figure out their dependencies, and sort them into "waves" or something, and then refactor the stuff in config.c so it matches the new world order. """