Clean up TestUtil.

 * Integrate two while loops waiting for valid device.
 * Try to open a device just after getting an device ownership so that
   other applicaitons do not steal device ownership before TestUtil
   opens a device.

Change-Id: Ia273cfb2a47fe630efd8c54b22d6ef5823a402b8
1 file changed