ANR: Print threads in deterministic order.

Print interesting threads first just in case the ANR is trimmed.

The order is: main thread; blocked threads; locked threads; etc.

Bug: 189881220
Test: Manually trigger ANR and check output.
Change-Id: I49ed525fdaa77d818e78dc7862308f8389463ba8
3 files changed