6800721: 3/4 JavaThread::jvmti_thread_state() and JvmtiThreadState::state_for() robustness

Check for NULL return values from jvmti_thread_state() and state_for() and return a JVM TI error code as appropriate.

Reviewed-by: coleenp, swamyv
7 files changed