Cast number to string in Postgres

fixes #9170
UTF-8 encode all keys and values in nested params hash.
Small typos here and there.
Warning removed unused variable task_name

warning: assigned but unused variable - task_name
Fix typos and improve docs a bit [ci skip]
Merge pull request #9732 from arunagw/warning_fix_unused_variable

Warning removed unused variable task_name
Merge pull request #9686 from strzalek/cast_number_to_string_in_pg

Cast number to string in Postgres
Merge pull request #9728 from vipulnsward/fix_em_typos

Small typos here and there.
rename `Relation#uniq` to `Relation#distinct`. `#uniq` still works.

The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our
Relation API is close to SQL terms I renamed `#uniq` to `#distinct`.

There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue
to work. I also updated the documentation to promote the use of `#distinct`.
Deprecate the `:distinct` option for `Relation#count`.

We moved more and more away from passing options to finder / calculation
methods. The `:distinct` option in `#count` was one of the remaining places.
Since we can now combine `Relation#distinct` with `Relation#count` the option
is no longer necessary and can be deprecated.
Merge pull request #9683 from senny/deprecate_count_distinct_option

rename `Relation#uniq` to `Relation#distinct`
Cache the association proxy object

This reimplements the behaviour of Rails 3, as I couldn't see why we
shouldn't cache the object, and @alindeman had a good use case for
caching it:

https://github.com/rails/rails/commit/c86a32d7451c5d901620ac58630460915292f88b#commitcomment-2784312
Refactored to reuse method
make it possible to disable implicit join references.

Closes #9712.
Merge pull request #9733 from senny/9712_option_to_turn_references_deprecation_off

make it possible to disable implicit join references.
make new rails apps log to STDOUT
Merge pull request #9691 from hone/stdout_logging

Rails default logging to STDOUT
Fix implicit join references option reversion in test
Merge pull request #5606 from teohm/multipart_unicode_param_name

multipart POST - utf8 param name not encoded
Revert "make new rails apps log to STDOUT"

This reverts commit b7d9d6e2cd5082d269dafbc0316e2107febe1451.

Per discussion with @jeremy and @rubys on Campfire.