[Android] Fix app crash that two page load each other

The crash is local reference table overflow (max=512), there is a thread hold the
input stream reference by analysing MAT.
Threads attached through JNI must call DetachCurrentThread before they exit. So
call DetachFromVM after AttachCurrentThread which wraps the DetachCurrentThread
function.

BUG=XWALK-3096