RenderScript cts: Fix issues related to concurrency.

Use a volatile qualifier for msgHandled in RSBase, since the flag
is accessed by multiple threads at the same time.

Ensure that checkForErrors() is called after waitForMessage() to
avoid a race condition.

Change-Id: I6d3811f16003d891d79ad5efe9d6f34a50132576
4 files changed