Improve renderscript context teardown.  Track object in the system and then force their cleanup by releasing all user references once destroy context is called.  Java layer will no longer send destroy notifications for objects garbage collected once a context is destroyed.
diff --git a/libs/rs/rsThreadIO.cpp b/libs/rs/rsThreadIO.cpp
index 4072f06..964901a 100644
--- a/libs/rs/rsThreadIO.cpp
+++ b/libs/rs/rsThreadIO.cpp
@@ -46,6 +46,10 @@
             con->timerSet(Context::RS_TIMER_IDLE);
         }
         const void * data = mToCore.get(&cmdID, &cmdSize);
+        if (!cmdSize) {
+            // exception occured, probably shutdown.
+            return false;
+        }
         if (con->logTimes) {
             con->timerSet(Context::RS_TIMER_INTERNAL);
         }