rails4: [Gem] update gems for transition from Rails 3 to Rails 4.

Tests are failing (as expected since no code has been updated for the new gems).
rails4: Copy changes from a blank/new Rails 4 project.

`rails new rails4 --database=postgresql --no-rc` was run to create a new Rails 4 project using Postgresql as the database.

That was then diff’d with the current wayground master branch to identify changes from 3.2 to 4. Most of those changes were then applied.

(A few other changes were made to address test failures and deprecations.)
rails4: scopes to lambdas, default_scopes to blocks. Built-in Postgres Hstore support.

Rails 4 requires that a lambda or proc be passed into `scope`.

It requires that a block be passed into `default_scope`.

Support for Postgresql Hstore fields is built into Rails 4, so no need for special code to handle those fields.
rails4: order stacking has been reversed in Rails 4.
rails4: .all deprecated when used on an ActiveRecord Relation, and Relation equality apparently doesn’t auto-map to Arrays.
rails4: `match` routes require an explicit method(s) (`via`) parameter.
rails4: routing uses `patch` instead of `put`.

(and some relations need to be converted to arrays for comparison.)
rails4: javascript tag generator no longer includes the type attribute, but may include other attributes in different orders.
rails4: anchor tag generator puts attributes in various orders.
rails4: nested models don’t save properly when being created on the parent and save is called on the parent.

Instead, have to directly save the models.
rails4: misc. spec fixes.
rails4: change `before_filter` to `before_action` in controllers.
rails4: `update_attributes` method is now just `update`.
rails4: `config.action_mailer.default_url_options` can now take a protocol specifier in the host.
rails4: route concerns.

Useful for repeated nested routes (like versions).
rails4: strip out remnants of old test directory.
rails4: add pending migration check to spec_helper.

This will report an error when specs are run, if there are any migrations that have not been run.
rails4: turbolinks support.

Add a loading indicator, in case some pages take a while to load.

Fix the javascript document ready handler to work on turbolink-loaded pages.
rails4: Turn on exceptions for unpermitted parameters in development environment.
rails4: can no longer get away with using `new` instead of `build` on associations.

This is the fix for the problem I tried to address back in commit dcb199f872d17e3ccd923352938fc88693c0089f (“nested models don’t save properly when being created on the parent and save is called on the parent.”) So, I’ve undone some of those changes, too.