Do backtrace collection while holding lock

Prevent cases where enough threads are doing backtraces at the same
time so that the system runs out of virtual address space, resulting
in std::bad_alloc.

Re-enabled test 708.

Test: test/testrunner/run_build_test_target.py art-jit-on-first-use-gcstress
Bug: 120112467
Change-Id: I291b9028880998aa33a53720dc2b3258ea7f3000
2 files changed