Hold intern table lock for AddImageStringsToTable

Fixes a correctness issue where another thread adding an intern string
after the visitor could cause duplicate strings.

Reduces how often the intern table lock is acquired, probably
improving performance.

Bug: 116059983
Test: test-art-host

Change-Id: I5ba6ca3ba7535de6d4ad5cb46750bd23a6e9aadc
3 files changed