Fix incorrect dex-cache clearing with structural redefinition

We were incorrectly clearing the dex-cache in some cases after
structural redefinition. Leaving some entries present that should
have been deleted. This could cause subsequently run code to
resolve static methods or fields incorrectly.

Test: ./test.py --host
Bug: 161846143
Change-Id: Idf23fc21f2e396c347861afd070363c509108096
9 files changed