Attached patch adds the zrestart() function that was discussed previously in workers/48408 and before (and also after). It was suggested originally that `zle -fn` be used to validate the dotfiles. However, I discovered that this can fail needlessly, for example, if a dotfile references dynamically named directories. Instead, to verify that the shell can restart without errors, I start an interactive subshell with an empty command and capture its return value and standard error. Likewise, it was suggested at some point that some form of `zsh -l && exit` be used instead of `exec zsh`. However, it was later brought up that, if the user would restart the shell many times this way, this could potentially exhaust the available process IDs. Thus, I use `exec zsh` after all. Hopefully, the validation above provides enough safeguards. At least the user doesn't have to worry about mistyping `zsh` as the argument to `exec` this way.