Set default RAILS_SECRET_KEY_BASE using SecureRandom.hex

Some extra commits were dragged along, but this is the only actual change.