Improve the performance of reflective operations.

Common dex index lookups require a number of different types to be constructed,
implement short-cuts that avoid the intermediate data types.
Refactor reflective operations to use dex methods that don't require temporary
objects.
Note: this change adds an empty short array to Dex, this code can't appear in
libcore.util as Dex doesn't always come with libcore.util.

Bug: 9968234

(cherry picked from commit 381db8de0ac5df124c7f482bf4be9d5756bf3ca4)

Change-Id: I9122a3f01b4f41b07a84aff768193c092e29698c
7 files changed