Fix the race condition of the static ITestDevice

Commit I9f79065d95c54bb5f7471ecbdb098b2a2e75537 made the reference
of sDevice static, which introduces the race condition when multiple
instances of the testing class is created for sharding the tests
across multiple devices.

A typical error is that TradeFed finds that the device is
unavailable after sDevice.rebootIntoFastbootd(), because the
sDevice might be pointed to another device during sharding.

Fixing this by using getDevice() from TestInformation each time
without storing the ITestDevice.

Also using ConcurrentHashMap for static references to make them
thread-safe. e.g., sDeviceIsGKI10, sDeviceCodeName.

Bug: 214331533
Bug: 215040011
Test: vts-tradefed run commandAndExit vts --module FastbootVerifyUserspaceTest --shard-count=2
Test: vts-tradefed run commandAndExit vts --module FastbootGetvarUserspaceTest --shard-count=2
Change-Id: Id7cc72ed806dd36061638602b6d23775b5bc688c
Merged-In: Id7cc72ed806dd36061638602b6d23775b5bc688c
(cherry picked from commit e84edd6fbb36efbcc0a72309551f5f9d2ea1f423)
2 files changed