[WIP] Make Discourse work on Rails master (4.1)

** DON'T MERGE THIS **

External:
- [ ] Wait for rails/rails#12979 to be fixed
- [ ] Merge SamSaffron/vestal_versions#1

Discourse
- [ ] Add new section to Gemfile
- [ ] Merge #1707
- [ ] Merge #1708