Make atomic ccache replacement work on Windows
Commit
371f09d4bf4ca0c7ba15c5ef909bc35307ed9cc3 relies on POSIX
rename() semantics for atomic ccache replacement. Windows rename()
fails if the destination file exists. Add a fallback to ReplaceFile()
when this happens. We may be able to do better using
FILE_RENAME_FLAG_POSIX_SEMANTICS (added in Windows 10 update 1067) but
this should generally suffice.
[ghudson@mit.edu: simplified code slightly; rewrote commit message]
ticket: 9190 (new)
tags: pullup
target_version: 1.22-next