Live Preview fixes

This is for #6122. Also is for #5687. And at least parts of #6830.

I also found a repeatable recipe that was causing connection errors when changing files, so I fixed the case of relaunching browser after "Relaunch Chrome" dialog is shown. See inline comments for more info.