Fix base::CopyDirectory() and JumpListIcons(Old) folders' operation logic

JumpListIcons(Old) folders are getting unexpectively huge for some users.
This is caused by file operation failures.

After analyzing those two folders' operation metrics by landing several changes,
we find that there are a few issues that need to be fixed.

1) base::CopyDirectory() in file_util_win.cc has incorrect logic when target
dir string contains source dir string. Please see detailed comments in the code,
2) When it fails to delete folder |JumpListIconOld|, we should not move
folder |JumpListIcon| to |JumpListIconOld|, otherwise |JumpListIconOld| can
get unexpectedly huge eventually.
3) When it fails to move folder |JumpListIcon| to |JumpListIconOld|, we
should still delete |JumpListIcon| to avoid endless file accumulation in it.

To fix the first issue, IsParent() function is used in file_util_win.cc to
replace the old logic. I have tested it in a previously checked-in CL.
The gathered user data confirms its correctness. It can be found in line
370 of the old version of jumplist.cc in this CL. In that version, I copied
and changed a few file operation functions from //base for debugging and
testing purposes.

We still log one kind of user data for verification and further analysis.

This CL also reverts several changes I made for debugging purpose.

BUG=40407,179576
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng

Review-Url: https://codereview.chromium.org/2570693002
Cr-Commit-Position: refs/heads/master@{#438778}
3 files changed