[Review only] Harden Live Development startup

This pull request fixes a number of races and re-entrancy problems in Live Development startup. Each commit fixes a separate, independent issue, as described in the commit message.

This pull request is for review only until I can figure out a better way to test these changes.