core/boot: Change how shutdown works

This isn't lovely (yet).  Basically, core now creates a condition which
it sets when it quits.  Currently, this is used by the "normal" main
thread (that is, not the Tk or interactive ones).  Rather than poll and
do a lot of sleeping, it now waits on the quit condition so that it can
exit much more quickly.

This also (sort of) adds a "starting up" state to core, which it really
should have had forever, and should really be part of sensible state
management, but for the moment is just a flag.
misc.switch_info: Include port info