Remove JumpListIconsOld directory and set upper limit for delete attempts

Current implementation for jumplist involves deleting JumpListIconOld
followed by moving JumpListIcons to JumpListIconsOld. In addition to
that holding icons in JumpListIconsOld has little benefits, this method
is problematic as we assume file's deletion and move are perfect while
they are not. There are certain unexpected situations where these steps
can fail, which has been proved by UMA metrics. This CL removes any
existing file operations related to JumpListIconsOld. A background
task is added to delete JumpListIconsOld for all users.

Also in one jumplist icons update, JumpListIconsOld and JumpListIcons
folders are tried to be deleted, which is a step with heavy IO involved.
Given that the UMA metrics are showing there are still quite a number
of updates taking a very long time, it is skeptical that base::Delete
has issues in some situations, e.g., when antivirus software is scanning
the icon files. It can be the case that base::Delete marks the files
deleted yet they are still there, which causes the files to be read in
every jumplist update.

A method to handle this case is to set an upper limit for the amount
of jumplist icons deleted as well as the amount of attempt failures
per update. This can avoid the jumplist file operations from taking a
very long time. Typically, there are less than 30 jumplist icons in
JumpListIcons(Old) folder, so setting the upper limit to be 100 is a
reasonable choice. This ensures a number of icons can be deleted per
update for users whose jumpilst folders are bloated without holding
the IO thread for an excessive long time.

Customized delete methods for JumpListIcons(Old) directories are created,
which allows limiting the time spent on file deletion and recording all
the possible failure reasons. These methods are put in new files named
jumplist_file_util.{h,cc}. Unit tests for these methods are also created.

BUG=40407, 179576

Review-Url: https://codereview.chromium.org/2752063002
Cr-Commit-Position: refs/heads/master@{#459297}
8 files changed