Check for unattached threads in JVMTI functions

Calling the JVMTI functions with an unattached thread is required to
return JVMTI_ERROR_UNATTACHED_THREAD.

Test: ./test.py --host -j40
Bug: 36576873
Change-Id: I312b4e0a5e5fb66961f6efcc36d9480626c3461f
4 files changed