[WIP] Upgrade to rails master/4.2

I was going to send this when I have the complete set of patches required, but I noticed @SamSaffron has started working on it too, so we should probably share notes :smile:
Actually, this is a regression.

The error message I was mentioning is:

```
     ActionView::Template::Error:
       Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
```

As you can see, the error message suggests that you add `only_path: true` to make it go away, but it doesn't do that and still complain about the missing `host` option.

So, I think it's supposed to work the way I proposed, but it's currently broken. I confirmed that it was working fine on 4.1, so it's a regression on master.