Chore/upgrade rails 4

@barnabyalter, it's not ready yet, but getting there. 
We still need to
- update the views for Bootstrap 3 (back end forms, in particular)
- re-implement the memcached part in Rails 4
- re-implement the typeahead stuff since typeahead was deprecated in Bootstrap 3