Add rsIsObject() to support library implementation.

We only had the "element" version of rsIsObject() previously. This change also
adds the beginning of a full API test for the script-side of RS (starting with
the RS object-related routines).

Change-Id: If341b352ad671be40b860a502c345a8149bf10f3
diff --git a/driver/rsdRuntimeStubs.cpp b/driver/rsdRuntimeStubs.cpp
index ac80ba3..4788a12 100644
--- a/driver/rsdRuntimeStubs.cpp
+++ b/driver/rsdRuntimeStubs.cpp
@@ -1222,24 +1222,23 @@
 // Compatibility Library entry points
 //////////////////////////////////////////////////////////////////////////////
 
-bool rsIsObject(rs_element src) {
-    return SC_IsObject((ObjectBase*)src.p);
-}
-
-#define CLEAR_SET_OBJ(t) \
+#define IS_CLEAR_SET_OBJ(t) \
+    bool rsIsObject(t src) { \
+        return SC_IsObject((ObjectBase*)src.p); \
+    } \
     void __attribute__((overloadable)) rsClearObject(t *dst) { \
-    return SC_ClearObject((ObjectBase**) dst); \
+        return SC_ClearObject((ObjectBase**) dst); \
     } \
     void __attribute__((overloadable)) rsSetObject(t *dst, t src) { \
-    return SC_SetObject((ObjectBase**) dst, (ObjectBase*) src.p); \
+        return SC_SetObject((ObjectBase**) dst, (ObjectBase*) src.p); \
     }
 
-CLEAR_SET_OBJ(rs_element)
-CLEAR_SET_OBJ(rs_type)
-CLEAR_SET_OBJ(rs_allocation)
-CLEAR_SET_OBJ(rs_sampler)
-CLEAR_SET_OBJ(rs_script)
-#undef CLEAR_SET_OBJ
+IS_CLEAR_SET_OBJ(rs_element)
+IS_CLEAR_SET_OBJ(rs_type)
+IS_CLEAR_SET_OBJ(rs_allocation)
+IS_CLEAR_SET_OBJ(rs_sampler)
+IS_CLEAR_SET_OBJ(rs_script)
+#undef IS_CLEAR_SET_OBJ
 
 const Allocation * rsGetAllocation(const void *ptr) {
     return SC_GetAllocation(ptr);