Make tests more flexible and less brittle

add a wait poller to selenium tests to avoid testing the DOM before the
page loads.

settings.py now contains TEST_HEADLESS, a boolean flag for deciding
whether to use a headless display for CI/remote testing, or a normal
display for "watching" the tests happen on screen.

Add ipdb and ipython to dev requirements