Use sched_yield in Monitor::MonitorEnter.

Previously we used NanoSleep(1000), but this was unreliable. It could
result in waiting for >= 40ms instead of 1us. Since this was in a loop
it was especially bad if the GC was trying to suspend all the
threads when we were sleeping. This resulted in thread suspension
occasionally taking longer than a second.
Results on the provided picasso-sample app on Nexus 5:
Longest GC pause before: ~1.5s.
Longest GC pause after: <5ms.

Also added a warning if thread suspension takes longer than a
threshold (currently 5ms).

Bug: 16307460
External bug:

(cherry picked from commit 251755cd511463260e60be98bf138b6aa1c14bf3)

Change-Id: I491c0799cc23ee6e68abc1bf77d1f0f4263e8ef5
2 files changed