autotest: refactor status_history into a lib outside of site_utils

CQ-DEPEND=CL:378599

BUG=chromium:641093
TEST=Ran dut_status command, verified working.

Change-Id: I9f60e2dff24683e66af00c7ce1c8a825b239e782
Reviewed-on: https://chromium-review.googlesource.com/378435
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@google.com>
diff --git a/server/lib/common.py b/server/lib/common.py
new file mode 100644
index 0000000..1fa1747
--- /dev/null
+++ b/server/lib/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+autotest_dir = os.path.abspath(os.path.join(dirname, os.pardir, os.pardir))
+client_dir = os.path.join(autotest_dir, 'client')
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=autotest_dir, root_module_name='autotest_lib')