Initialization logic needed for serve, build, and upload is now much more clear than it was when these functions were written. This commit refactors all of them to use a new common_setup module for all of their initialization that's the same.