Web MIDI: Make TaskService and MidiManagerWin integer-overflow-proof

TaskService and MidiManagerWin uses int to identify the instance,
but this change makes it int64_t and improve them to fail gracefully
without shutting-down the browser due to CHECK failures.

For practical use, the original int is enough and it's impossible
to overflow the instance ID unless attackers success to run their code
for several months on an occupied active processor.

Bug: 921581
Change-Id: I62c7cd737ab3d3969e372bb394e60381473eaa58
Reviewed-on: https://chromium-review.googlesource.com/c/1449483
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631175}
10 files changed