[autotest] Adding 'off' state to switch_usbkey and related changes to fix 225932

This CL includes the following changes:

1. switch_usbkey allows a third usb setting "off"
2. switch_usbkey sleeps after switching to "host"
3. In autotest, server/cros/servo/servo.py, method __init__():
Change the call to switch_usbkey() to pass 'off' instead of 'host'.
4. In autotest, server/hosts/site_host.py, method servo_install():
    Change the call to switch_usbkey() to pass 'off' instead of 'host'.
5. Record the initial state of prtctl4_pwren and restore it at the end of
the _probe_host_usb_dev

Hopefully, this can reduce the occurence of usb to get wedged.

BUG=chromium:225932
TEST=Test the repair flow from four initial USB mux states
usb_mux_sel1:dut_sees_usbkey prtctl4_pwren:on
usb_mux_sel1:servo_sees_usbkey prtctl4_pwren:on
usb_mux_sel1:dut_sees_usbkey prtctl4_pwren:off
usb_mux_sel1:servo_sees_usbkey prtctl4_pwren:off
Confirm that after each case, the repair job succeeds
and 'dut-control prtctl4_pwren' reports 'prtctl4_pwren:off'

Change-Id: I04385bd9ec99d677ec1870b17bcbadc874cb4d20
Reviewed-on: https://gerrit.chromium.org/gerrit/59357
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
2 files changed