Fixes sporadic timing-related test failures.

# Changes
 - Adds `thenWhenReady` and `thenOpenWhenReady` classes, which wait for `js-ready` class to be added to the `<html`> element. This fixes sporadic test failures if JavaScript (in particular modal initialization) did not finish in time for tests.
 - Updates tests to use these new helpers


![screen shot 2014-09-29 at 4 06 31 pm](https://cloud.githubusercontent.com/assets/583202/4449839/34202322-481f-11e4-9ae7-6fd7a0eece94.png)

![i lied](https://cloud.githubusercontent.com/assets/583202/4460605/ac6a456c-48b3-11e4-8297-1b877263787b.jpg)