Adding the route_key and param_key tests

This way all the tests are testing the same fields
Merge pull request #9035 from adomokos/aligning_tests

Adding the route_key and param_key tests
Add postgresql range types support
Remove warning by using a custom coder

The native JSON library bypasses the `to_json` overrides in
active_support/core_ext/object/to_json.rb by calling its native
implementation directly. However `ActiveRecord::Store` uses a
HWIA so `JSON.dump` will call our `to_json` instead with a
`State` object for options rather than a `Hash`. This generates
a warning when the `:encoding`, `:only` & `:except` keys are
accessed in `Hash#as_json` because the `State` object delegates
unknown keys to `instance_variable_get` in its `:[]` method.

Workaround this warning in the test by using a custom coder that
calls `ActiveSupport::JSON.encode` directly.
Merge pull request #7345 from slbug/master

Postgresql range support
ActionDispatch::Http::UploadedFile is a permitted scalar [Closes #9051]
Fix PostgreSQL tests on Travis

Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
Depend on thor >= 0.17.0
assigning '0.0' to a nullable numeric column does not make it dirty