Add sanity checking to declaring class visiting

When we have an unmarked declaring class in the image, it will
SIGSEGV due to the bitmap being read-only. Print some useful
info to try and debug this.

This probably hurts performance a bit, TODO disable when the bug is
fixed.

Bug: 27493510

Change-Id: Ida0c09cb8e41c1c2ff5cd9d07cbf0d34d6802511
3 files changed