Initial support for adding virtuals with structural redefinition

Initial implementation of adding virtual methods and non-static fields
using structural redefinition. Currently this is limited to 'final',
non-finalizable classes. These restrictions will be removed or
loosened in the future.

All non-collected instances of the redefined class will be made
obsolete and reallocated. This can cause significant GC load.

This feature does not work with any of the -quick opcodes and should
only be used with dex files that haven't undergone dex2dex
compilation (that is --debuggable and BCP dex files).

Test: ./test.py --host
Bug: 134162467
Bug: 144168550

Change-Id: Ia401d97395cfe498eb849a661ea9a900dfaa6da3
36 files changed