Make Chrome_DevToolsADBThread shutdown gracefully in tests

To land the BrowserUIThreadScheduler we need in tests for all threads
to stop using base::PostTaskWithTraits before the scheduler is
deleted. Currently this is true for the UI and IO threads but it's
not true for Chrome_DevToolsADBThread.

This patch makes sure references retaining
AndroidDeviceManager::HandlerThread are released in tests
which triggers thread shutdown, fixing the problem.

Bug: 863341, 872372
Change-Id: Iec737aac74fb62118d07b6cf878a14db055f5be5
Reviewed-on: https://chromium-review.googlesource.com/1238468
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593850}
8 files changed