Enabling thread independent JNI objects

In addition the comments raised while this change was in zulu are also being addressed. See zulu for details using the earlier link. Also, the changes made for those comments were lost while moving to Jenkins. I have redone those changes again and committing it now

Change-Id: I5b709e1e01f474ade306b19ab21b53ee35997f25
Merge "Enabling thread independent JNI objects"