Avoid global loop counter variables in some tests

The use of a global variable as loop counter in these tests is
unnecessary (perhaps accidental), and a pending change in how V8
optimizes global loads and stores causes one of the tests
(fast/js/try-catch-crash.html) to time out in an msan build.

Bug: chromium:917714
Change-Id: Iadd53929873f4a7b6b1d4683aa3081ee2d0f1d86
Reviewed-on: https://chromium-review.googlesource.com/c/1406727
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622003}
7 files changed