7032129: Native memory usage grow unexpectedly for vm/oom/*InternedString tests
Reviewed-by: kvn, kamg, jcoomes
StringTable::verify uses as_unicode_string to verify the hash code we
keep in the table but the only resource mark is outside the loop.
This means that verification makes a copy of the entire StringTable in
a resource area. Now that interned strings aren't in perm the
StringTable can become as large as the Java heap which means
verification can overflow the address space. The fix is to compute
the hash directly from the char instead of making a copy. I moved
the hash_string logic into java_lang_String and updated the users
appropriately. Tested with test case that allocates interned strings
until we run out of heap.