Fix JNI usage issues in Android TestLogParser

 * Android TestLogParser used CallObjectMethod() on Java methods returning
void, which causes CheckJNI to throw an error. Changed to use correct
CallVoidMethod().

 * TestLogListener wrapper was not freeing local jstring references,
which given large parse buffer size could easily lead to ART local
reference table overflow. Fixed by freeing all local references as soon
as the objects are passed to the Java / VM side.

Change-Id: I19811be6fdc0f3d77bc7a0d99d243529031d3b08
diff --git a/framework/platform/android/tcuTestLogParserJNI.cpp b/framework/platform/android/tcuTestLogParserJNI.cpp
index 59a4edb..e436b97 100644
--- a/framework/platform/android/tcuTestLogParserJNI.cpp
+++ b/framework/platform/android/tcuTestLogParserJNI.cpp
@@ -107,12 +107,12 @@
 
 void TestLogListener::beginSession (void)
 {
-	m_env->CallObjectMethod(m_object, m_beginSessionID);
+	m_env->CallVoidMethod(m_object, m_beginSessionID);
 }
 
 void TestLogListener::endSession (void)
 {
-	m_env->CallObjectMethod(m_object, m_endSessionID);
+	m_env->CallVoidMethod(m_object, m_endSessionID);
 }
 
 void TestLogListener::sessionInfo (const char* name, const char* value)
@@ -120,26 +120,30 @@
 	jstring jName	= m_env->NewStringUTF(name);
 	jstring jValue	= m_env->NewStringUTF(value);
 
-	m_env->CallObjectMethod(m_object, m_sessionInfoID, jName, jValue);
+	m_env->CallVoidMethod(m_object, m_sessionInfoID, jName, jValue);
+	m_env->DeleteLocalRef(jName);
+	m_env->DeleteLocalRef(jValue);
 }
 
 void TestLogListener::beginTestCase (const char* testCasePath)
 {
 	jstring jTestCasePath = m_env->NewStringUTF(testCasePath);
 
-	m_env->CallObjectMethod(m_object, m_beginTestCaseID, jTestCasePath);
+	m_env->CallVoidMethod(m_object, m_beginTestCaseID, jTestCasePath);
+	m_env->DeleteLocalRef(jTestCasePath);
 }
 
 void TestLogListener::endTestCase (void)
 {
-	m_env->CallObjectMethod(m_object, m_endTestCaseID);
+	m_env->CallVoidMethod(m_object, m_endTestCaseID);
 }
 
 void TestLogListener::terminateTestCase (const char* reason)
 {
 	jstring	 jReason = m_env->NewStringUTF(reason);
 
-	m_env->CallObjectMethod(m_object, m_terminateTestCaseID, jReason);
+	m_env->CallVoidMethod(m_object, m_terminateTestCaseID, jReason);
+	m_env->DeleteLocalRef(jReason);
 }
 
 void TestLogListener::testCaseResult (const char* statusCode, const char* details)
@@ -147,14 +151,17 @@
 	jstring	 jStatusCode	= m_env->NewStringUTF(statusCode);
 	jstring	 jDetails		= m_env->NewStringUTF(details);
 
-	m_env->CallObjectMethod(m_object, m_testCaseResultID, jStatusCode, jDetails);
+	m_env->CallVoidMethod(m_object, m_testCaseResultID, jStatusCode, jDetails);
+	m_env->DeleteLocalRef(jStatusCode);
+	m_env->DeleteLocalRef(jDetails);
 }
 
 void TestLogListener::testLogData (const char* data)
 {
 	jstring logData = m_env->NewStringUTF(data);
 
-	m_env->CallObjectMethod(m_object, m_testLogData, logData);
+	m_env->CallVoidMethod(m_object, m_testLogData, logData);
+	m_env->DeleteLocalRef(logData);
 }
 
 class TestLogParser