Autotest: Add chromeos2 lab support to RPM Infrastructure.

Added support for devices in chromeos2 lab to the RPM Controller
codebase. It will determine if the device is behind a hydra device and
if so complete the proper login/logout procedures required.

So it turns out that theres a known pycurl/libcurl  issue that can occur
sometimes when used with multiple threads and cause the python thread to
crash. Therefore I replaced the geturl call to utilize urllib instead.

BUG=chromium-os:30955
TEST=Expanded the functional tests and ensured the unittests still work.
Stress tested web calls in a while loop to ensure that no threads crash.

Change-Id: I646abe2f09cf00304892bad217e7f1a9561e1297
Reviewed-on: https://gerrit.chromium.org/gerrit/29822
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
4 files changed