Add ClassPreDefine hook.

This hook is called prior to defining a class for the first time. It
allows callbacks to modify the dex-file used to load the class if they
wish. The event handler is responsible for ensuring that the returned
dex-file is set-up correctly.

Bug: 31684920
Test: mma -j40 test-art-host
Change-Id: Iaed79c1597913148ead795e033a0a10a4ebe6b2b
5 files changed