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)

Ah, re-read my commit message. I originally thought they were causing the issue, but it seems like it was caused by CasperJS attempting to open another modal before the last one was closed.