Visit IMT of all classes during image writing

We still need to visit the IMT for classes that does not have any
methods. It is required to visit the IMT of every class to assign
image offsets for the conflict table methods.

Added regression test.

Bug: 28707801

(cherry picked from commit 54689b7d5568dcf01ff42d69435d0af7ae4e4d8e)

Change-Id: I4806685c32df7f2707f6018e21a489bfd48af6f7
6 files changed