ART: Fix GetThreadInfo

Fix the retrieval of the context classloader. Make sure to have
the field from the Thread class, don't look into a subclass.

Add caching for the field. Also fix the usage restriction of the
function, which is only valid during the Live phase.

(cherry picked from commit db6c2ab29ef6ebe89c9ea43dae3b899a935fa74e)

Bug: 36654185
Test: ./test.py --host -r -t 924
Change-Id: I5cce41b31c32e59c80bb7c3afa03e8b0975ec54e
6 files changed