Move some code from `ArtMethod` to run-test 664.
The code was originally introduced in
https://android-review.googlesource.com/181131
but it has not been used outside testing since
https://android-review.googlesource.com/1216803 .
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I22f44e13d96f891a5a5c631def78d7604c7f85bf