ART: Refactor libarttest C++ code

Refactor some libarttest JNI functions into a common directory, so
they can be easily used by multiple tests without code duplication.
This is preparation for better deoptimization state testing.

Change-Id: I43f7340b699b26930aabfd665c707e0485b17fc8
8 files changed