Revert^2 "Add MessageQueue for cross-thread communication"

This reverts commit c7edde06dc2cfb90114898e8de82e0e1287c2885.

Reason for revert: fixing bugs.

There were two issues. The first was a logic error in
MessageQueueTest::ReceiveInOrder.  The test would allow any message to
be replaced by a timeout message, but then the sequence would be out of
sync. The change now explicitly advances the message pointer, which
means the timeout message does not effectively replace an expected
message.

The seccond issue was one where MessageQueue may try to call
ConditionVariable::TimedWait with a negative timeout if the deadline had
already passed, which fails with an EINVAL error during the call to
futex. The code in MessageQueue::ReceiveMessage now checks for negative
timeouts before calling TimedWait.

Test: m test-art-host-gtest-art_runtime_tests
Bug: 174652565
Change-Id: I107af849e2a01727719f7662a7685d989b42d176
3 files changed