More robust detection of rails 4

Using `Rails.version` requires the `Rails` constant to exist. When
including `gds-sso` in the build of a non-rails gem (e.g.
`govuk_content_models`) that would cause the build to fail because Rails
would not be loaded in the tests. This alternative way of checking the
rails version is more robust to that scenario.
Merge pull request #42 from alphagov/improve-rails-4-detection

More robust detection of rails 4