Time out jumplist update for very slow or busy OS

Notifying OS about the jumplist update consists of 4 steps in order:
BeginUpdate, AddCustomCategory, AddTasks and CommitUpdate, all of
which shouldn't take long.

However, UMA data shows that each step can take up to tens of seconds
for some Chrome users. Among the 4 steps, AddTasks is in the best
condition, while CommitUpdate is in the worst condition.

Since they are mostly Windows API calls, we can assume this is due to
user machines (which can be very slow or busy) with a pretty high
confidence, and also there's not much we can improve on Chrome's side.
For these situations, we should stop jumplist update to avoid making
things worse. Code-wise, we stop the update if BeginUpdate takes a
crazy amount of time, as the following steps (delete old icons, create
new icons, AddCustomCategory, CommitUpdate, etc) are very likely to
take a long time too.

BUG=40407, 179576

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