Splitting up wait_for_device into two pieces

BUG=skia:5111
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829753004

Review URL: https://codereview.chromium.org/1829753004
3 files changed