Make JS integration tests work again.

This has involved upgrading capybara, and switching from capybara-webkit to poltergeist.