Implement the direct ByteBuffer JNI functions, GetObjectRefType, and the string region functions.

Also run tests in a consistent (alphabetical) order.

Change-Id: I1bb4f3389e749ec031254d23da349be0397c260d
diff --git a/src/utils.h b/src/utils.h
index 4283f47..229d123 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -125,7 +125,7 @@
 static inline std::string PrintableString(const StringT& s) {
   std::string result;
   result += '"';
-  for (typename StringT::iterator it = s.begin(); it != s.end(); ++it) {
+  for (typename StringT::const_iterator it = s.begin(); it != s.end(); ++it) {
     char ch = *it;
     if (NeedsEscaping(ch)) {
       StringAppendF(&result, "\\x%02x", ch & 0xff);