Avoid use of pthread_getschedparam (except on the Mac)

Squashed commit of two cherry-picks:

    During Thread::DumpState the pthread may have exited.
    We have the tid, use that instead.

    Test: m -j50 test-art-host -k
    Test: adb shell kill -3 `pid system_server`
    Bug: 36445592

    (cherry picked from commit 08e762782a1e352c329945e0df3f35da7e71ad8a)

    Restore broken code for the Mac

    Test: m -j48
    Bug: 36445592

    (cherry picked from commit 4b16f0b860f4d59601706305b2949b98db586a47)

Test: m -j48 && flashall && m -j8 test-art-host
Bug: 36445592
Change-Id: I96d51614f569338d85de0fd59188445df3289dfd
1 file changed