Android OOP-D: Use JavaHandlerThread for Display Compositor

Android OOP-D requires running a Java Choreographer based
BeginFrameSource on the display compositor thread. In order to do this,
this thread must have a Java looper.

This CL adds a looper by converting this thread from a base::Thread
to a base::android::JavaHandlerThread on Android. As we also want to
be able to specify a thread priority for this thread, this patch adds
thread priority support to the JavaHandlerThread class.

Bug: 811967
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: I12d39edd5925f33629e91ad17eaf575ed49b0296
Reviewed-on: https://chromium-review.googlesource.com/1109020
Reviewed-by: Khushal <[email protected]>
Reviewed-by: Yaron Friedman <[email protected]>
Commit-Queue: Eric Karl <[email protected]>
Cr-Commit-Position: refs/heads/master@{#569333}
7 files changed