Add string prefix optimization

Optimize until fixed point by reducing to shorter prefixes if there
are savings.

This dictionary optimization saves up to 2.6% more. Average prefix
savings are 4.6% on top 99 APKs.

Test: test-art-host
Bug: 77709234
Bug: 77721545
Change-Id: I8e9e3aaf06ded9fde0153e8236f8c6b56450d881
2 files changed