Create ATTACH_THREAD macro

This is needed because the parameter lists for AttachCurrentThread
differ between Android and other JVMs. When we are building for Android,
we need not cast to void**, all other platforms require this cast.