Update to rails 4

This pull request updates the site to use rails 4. All tests pass, and all deprecation warnings reported by the tests are fixed, but it does currently rely on patched versions of two gems (oauth-plugin and i18n-js).

There is a test site at http://rails4.apis.dev.openstreetmap.org/ and this could do with some testing before we think about merging it.