ART: Correctly handle an abort from an unattached thread

Libbase may be shared with other platform components. In that case,
if the aborting thread is attached to the runtime, ART will print
its usual dump to be helpful.

If the thread is unattached, this must not be done as it would
violate mutex invariants.

Bug: 135056249
Test: m test-art-host-gtest-runtime_test
Change-Id: I61c3df5fdbc8ddaf279f39dc653738016986dcd9
3 files changed