autotest: refactor graphics_utils.

Move screenshot code to graphics_utils.
Move xsystem et al to cros_ui.py.
Fail if X is used under freon.
Make pylint happy.

TODO: write a (unit/auto)test for graphics_utils.

BUG=chromium:422414
TEST=Ran graphics_GLMark2 power_Consumption power_Backlight ui_SystemTray
     on nyan_big, verified that code got exercised and is not broken.
     Ran camera_V4L2 desktopui_GmailLatency graphics_GLAPICheck graphics_Gbm
     graphics_Piglit graphics_SanAngeles hardware_VideoOutSemiAuto on
     link_freon and nyan_big and made sure we got reasonable pass/fail.

Change-Id: I31f49d8c7b7a4e899bf47ba0b3543fc8755eecb8
Reviewed-on: https://chromium-review.googlesource.com/222990
Reviewed-by: Haixia Shi <hshi@chromium.org>
Commit-Queue: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
18 files changed