Refactor starting networking

This is a cleaner approach to starting the networking, which removes the
race condition in the previous design and fits more closely with the
rest of the architecture for startup routines in the CLI and GUI
clients.