Refactor ClassAccessor to use an index instead of ClassDef pointer

Removes a separate class_def_idx being required for getting the index
of a ClassAccessor foreach loop.

Bug: 79758018
Test: test-art-host-gtest

Change-Id: Ie3010a17669f24cf492c678b55bdddba7ec62ea8
11 files changed