Adding autotest to reboot the device

This is a server side autotest which runs the 'modem status' command on
the DUT and strips the 'state' from its output. If the modem does not
return anything or it is in an untestable state (please see the bug for
various state descriptions), the test will try to reboot the DUT for a
maximum of 2 tries by default. The user can override the number of tries
by passing the 'tries' flag as an arg with a desired number of tries
when running the test.

BUG=chromium:349638
TEST=Ran the test against link, daisy and spring. Most of the testing
was done against link by manually stopping the modem manager on the
device and letting this test detect the status and state and cold
rebooting the device based on the criteria explained in the bug. Testing
was also done by manually disabling the modem via the UI as well as
removing the SIM card from the device.

Change-Id: Ibb73eae4c5ae3ba7c11694d967612ab58c1edfee
Reviewed-on: https://chromium-review.googlesource.com/189106
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: harpreet Grewal <harpreet@chromium.org>
Tested-by: harpreet Grewal <harpreet@chromium.org>
4 files changed