Switch from capybara-webkit to poltergeist

We don't have a compatible version of QT in the VM or in our default
VM/Lucid builds for the latest version of capybara-webkit. Rather than
rebuilding a newer version of QT, we can switch to using the
poltergeist capybara driver. This uses phantomJS, which doesn't
require QT or Webkit and also has the added advantage of being
entirely headless, so we no longer need an Xvfb display either.
Update carrierwave

Gets rid of some deprecation warnings relating to the use of
ActiveSupport::Memoizable
Stop path comparison failing due to timing issues

We cannot rely on the cachebust timestamp in the assertion  being the
same as when the page was originally rendered.
Revert "Revert "Merge pull request #571 from alphagov/rails-upgrade""

This reverts commit 5c49c80c9d76d9d6129253c0ea90e6bc49b4de48.
Merge branch 'rails-upgrade'
Completely disable active record when building assets

There appear to be other hooks in active record which fire in rails 3.2.
One of these was triggering the schema cache to be reloaded at app boot
time which was attempting to connect to the mysql database. This was
failing during the rake assets:clean task.

This change disables the inclusion of active record entirely if the
appropriate environment variable is set.
Bugfix: correct check for active record