1. When calling writefile(list, fname, []) do not show error message twice.
2. Do not allow file name to be overwritten for writefile([1], 2).
3. Do not show “Can’t open file with an empty name” error after error like
“using Float as a String” when type of the second argument is not correct.
4. Do not give multiple error messages and still continue for code like
`writefile(["test", [], [], [], "tset"])`.
Note that to fix 4. ideally I need tv_check_str_or_nr which is currently present
in two PRs: #6114 and #5119. I would want to avoid copying this function into
a yet another PR.
Ref vim/vim#1476.