Upgrade to Rails 3.1

The tests fail under Ruby 2 because Rails 3.0 is not compatiable with
Ruby 2. This upgrades the app to Rails 3.1 which yields a different set
of problems because it is still not Ruby 2 compatible however the tests
are still passing under Ruby 1.9.3 and it is the first step towards
Rails 3.2. There are still

There were a number of gem version conflicts when attempting to upgrade
Rails. In order to allow bundler to update associated gems the current
versions were specified in the Gemfile. This meant that was possible
to run `bundle update` without things like Rspec being upgraded to
version 3 which would have required more invasive app changes.