os.execv on Windows joins its arguments with spaces and quotes nothing, so
only the interpreter and script path, quoted by hand, survived a restart.
An argument with a space, such as --output-directory "D:\My Outputs", was
split in two and ComfyUI failed to start with 'unrecognized arguments'.
Build the command in manager_util.build_restart_command and use it at the
three restart sites: the reboot endpoints of the glob and legacy servers
and the prestartup restart. On Windows every entry is quoted with
subprocess.list2cmdline; other platforms get the same list as before. The
endpoints still drop --windows-standalone-build, now every occurrence
rather than only the first, and the prestartup restart still keeps it.
Port of #3488 to v4 (#3339).