String hashing cleanup in `InternTable`.

Keep the hash code in `String` as `int32_t` but work with
unsigned hash in `InternTable` and add `static_cast<>`s
where needed. Make sure that the hash code is stored in the
`String` before inserting it in the `InternTable` and avoid
the check whether it's calculated in the hash function. Add
`DCHECK()`s to verify that the stored hash code is correct.

Pass the hash code between `InternTable` functions to avoid
repeatedly retrieving it from the string if the compiler is
unable to prove that the memory location did not change.

Remove unnecessary `*FromTransaction` helper functions that
were just doing a `DCHECK()` and then forwarding to other
functions. Update `Transaction` to do that DCHECK() and call
the needed functions directly.

Make an explicit decision to calculate hash code for all
image strings, including those that are not interned. We
previously calculated hash code for all app image strings
by accident while collecting interned string references.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: I7cec91e797fdb98ae52f9666620d7b311d465422
11 files changed