Avoid creating preresolved strings array for dex files that have no strings

Had exposed a bug in the image writer where having an empty non-null
array caused an assert failure.

Added test.

(cherry-picked from commit adbe2b10d3e9d1cba9c313043941ca591ed109f0)

Bug: 152809035
Test: test-art-host
Merged-In: I0671eef56ae7cbe67bb4ecdbcd72df4e26c8aaa3
Change-Id: I0671eef56ae7cbe67bb4ecdbcd72df4e26c8aaa3
3 files changed