Fix cmSystemTools::RenameFile race on Windows

Since commit d46d8df0 (Re-implemented cmGeneratedFileStream to look like a
real stream and replace the destination file atomically, 2004-11-03) our
RenameFile implementation tries to deal with MoveFile not replacing
read-only files.  In order to avoid the Get/SetFileAttributes pair we used
stat to test for existence of the destination file.  This has a race in
which the destination could be created between the test for existence and
the MoveFile call.

Remove the stat call and use GetFileAttributes to detect whether the file
exists.  This shortens the race but does not eliminate it.  Use a loop to
try multiple times in case we lose the race.  While at it, drop Win9x
support and always use MoveFileEx.
Merge topic 'fix-atomic-rename-on-Windows' into next

2e4188e Fix cmSystemTools::RenameFile race on Windows