Prune methods in image DexCache based on referencing class.

This is a follow-up to
    https://android-review.googlesource.com/353911
where we did the same thing for fields.

Test: 163-app-image-methods
Test: testrunner.py --host
Test: testrunner.py --host --jit
Bug: 30627598
Change-Id: Ic24546f7e4a42f0f85e224a65ce1c8f7f1439340
8 files changed