Libcore: Add VMStack.getAnnotatedStackTrace

Add AnnotatedStackTraceElement to describe a stack frame
and held locks as well as an object the frame is blocked
on.

Add VMStack.getAnnotatedStackTrace to return an array that
contains an AnnotatedStackTraceElement for each stack frame,
with the StackTraceElement describing the frame, an array
containing all objects that are locked at the described location,
and optionally for the top frame an object the thread is blocked
on, waiting for or sleeping on.

Bug: 70538431
Test: m test-art-host
Test: art/test/testrunner/testrunner.py -b --host -t 168
Change-Id: I0d92e3d8182c4a592549a6445854816f71afd29e
3 files changed