Use GUID to generate unique temp file names and retire GetTempFileName

We use GetTempFileName Windows API to generate an unique temp file name
in some scenarios like downloading files.

It is mentioned on MSDN for this API that "Due to the algorithm used to
generate file names, GetTempFileName Windows API can perform poorly when
creating a large number of files with the same prefix. In such cases, it
is recommended that you construct unique file names based on GUIDs." The
reasons why it's doing poorly include it takes a long time to find an
unique name when a lot of names are already in use. This has been proved
by the fact we found this API call takes minutes for some users who have
lots of temp files in their default download directory. Note that the
temp files in the default download directory can be generated by any
software other than Chrome.

This CL retires GetTempFileName and uses GUID to generate unique temp
file names. With GUID, it is almost guaranteed that an unique temp file
name can be generated with a single attempt.

BUG=103737

Review-Url: https://codereview.chromium.org/2788483005
Cr-Commit-Position: refs/heads/master@{#462662}
1 file changed