Start on DexBuilder

This change begins work on DexBuilder, which will allow us to generate DEX files
directly from layouts. This version is rather limited, but we will expand its
functionality in future CLs. The DexBuilder in this CL can create a DEX file
from scratch, define classes, and define methods on those classes. Within
methods, it supports extremely simple instructions, such as storing a small
constant in a register and returning a value from a register. Additionally,
there are tests to make sure that at least at a structural level, the generated
DEX files are valid.

DexBuilder and its associated builder classes use functionality from
libartdexfile and the Dex Slicer tool to support the actual encoding of DEX
files.

Test: atest, also manually tested by loaded a generated DEX file in an Android
app and verifying its behavior.

Change-Id: Iaa01aa7e3a0c7e4d5f4fa8dbce1492499c93c222
5 files changed