A change in the default configuration of development environments
in rails 5.1 means that caching is now disabled by default so in
that case fall back to using cookies instead.
Closes#1666
The sql_session_store plugin doesn't work with rails 3 and doesn't
seem to be supported anymore, so drop it in favour of the builtin
database backed session storage.
Use a preinitializer to load the settings from application.yml so
that they are available as early as possible. All settings can also
be overridden using environment variables.
The ad-hoc settins in environment.rb are then moved to this new
system so we have one consistent location for settings.