Detaching current thread in JNIHelper

It is very important because after a while JNI just stop working. It
happens after couple of hours on Nexus 4 on Android 4.4. Please look and give
some feedback.