test: Clean up site_login.py a bit.

This has overlap with rginda's
http://codereview.chromium.org/1534001, but there's
one part that I prefer from my change: making all
of these wait_ functions throw exceptions when they
time out, which cuts down on a bunch of code that
would otherwise need to be duplicated across all of
our tests.

I also ran into a bunch of races in UI tests when I
reduced the polling timeout, so I've tried to fix
those too.

BUG=none
TEST=ran the tests, both logged-in and logged-out

Review URL: http://codereview.chromium.org/1565001
diff --git a/client/bin/chromeos_constants.py b/client/bin/chromeos_constants.py
index d74ee9d..18d1f3b 100644
--- a/client/bin/chromeos_constants.py
+++ b/client/bin/chromeos_constants.py
@@ -17,4 +17,7 @@
 
 LOGGED_IN_MAGIC_FILE = '/var/run/state/logged-in'
 
+CHROME_WINDOW_MAPPED_MAGIC_FILE = \
+    '/var/run/state/windowmanager/initial-chrome-window-mapped'
+
 DISABLE_BROWSER_RESTART_MAGIC_FILE = '/tmp/disable_chrome_restart'