ART: Add stack-dump mode for contention logging

Add a second threshold to contention logging. If this threshold
is reached, log the owner and the contender thread to the logcat.

Requires a bit of refactor in the contention logging code to hold
the locks correctly (different requirements for owner and contender).
Add -Xstackdumplockprofthreshold:ms to control the threshold value.
As with general contention logging, default to 0 = off. Use ThreadStress
with --locks-only to get test coverage.

Bug: 62353392
Test: m test-art-host
Change-Id: I1b5a5130c4f908497ac06464130844f5ca42a5fb
diff --git a/test/004-ThreadStress/expected.txt b/test/004-ThreadStress/expected.txt
index 772faf6..9eaab24 100644
--- a/test/004-ThreadStress/expected.txt
+++ b/test/004-ThreadStress/expected.txt
@@ -9,3 +9,14 @@
 Finishing worker
 Finishing worker
 Finishing worker
+JNI_OnLoad called
+Starting worker for N
+Starting worker for N
+Starting worker for N
+Starting worker for N
+Starting worker for N
+Finishing worker
+Finishing worker
+Finishing worker
+Finishing worker
+Finishing worker