Shift register index tests to static pass.

This rather hefty change moves the range tests on register index values
from the code-flow pass to the earlier static analysis pass.  The idea
is to test everything up front so that we don't have to do a bounds
check every time we get or set a register value during verification.

This allowed some simplification in the code-flow pass, since get/set
of a register no longer needs to have the method register count passed
in, and can no longer fail due to bad input.

As part of doing this, some of the static verification code was
cleaned up, e.g. the instruction decoding is now only done in one place.

This had no apparently effect on performance on nexus one -- verify+opt
of the bootstrap classes takes the same amount of time.  However, it
does reduce the compiled size of the humongous instruction verification
method by about 10%.

Also, cleaned up some instruction format stuff (e.g. removed 3rfs).

Bug 2534655.

(cherry-pick from dalvik-dev)

Change-Id: I1b220f4e97b1214ed575470695c52e1bd64d5137
diff --git a/libdex/Android.mk b/libdex/Android.mk
index 558a7e5..2ef8371 100644
--- a/libdex/Android.mk
+++ b/libdex/Android.mk
@@ -46,6 +46,7 @@
 ifneq ($(SDK_ONLY),true)  # SDK_only doesn't need device version
 
 include $(CLEAR_VARS)
+#LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1
 LOCAL_SRC_FILES := $(dex_src_files)
 LOCAL_C_INCLUDES += $(dex_include_files)
 LOCAL_MODULE_TAGS := optional