Refactor monitor_reconfigure to stop using system("xrandr").

This removes the blinking on monitor plug/unplug.
This also avoids crashes we get on intel because of vsync bugs.

Change-Id: I04ad539a66ba7db1786a4c5d0d4eb7638e99cdd1

BUG=None.
TEST=Plug in a second screen, check that things display on the external screen. Unplug the screen, check that things come back on the internal lcd.

Review URL: http://codereview.chromium.org/6732013
5 files changed