Fix icu::OlsonTimeZone::getHistoricalOffset crash

The icu::TimeZone::adoptDefault may delete a old default timezone
while anther thread is calling the clone() to that old default timezone
in the createDefault running on another thread. Need to protect the
delete and DEFAULT_ZONE->clone() running concurrently. Otherwise, the
returned cloned TimeZone could contains partially trashed data and
cause crash later on.

test in https://chromium-review.googlesource.com/c/v8/v8/+/1601370

Upstream bug: https://unicode-org.atlassian.net/browse/ICU-20595
upstream PR: https://github.com/unicode-org/icu/pull/649/

Bug: chromium:950851
Test: v8 unittests - DateCache:AdoptDefault*
Change-Id: Ic8a1c374f20a50f5ebd567df8d34a65987315a7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1602037
Reviewed-by: Jungshik Shin <jshin@chromium.org>
3 files changed