Cache key should be different when is Array.

`cache.fetch(['foo'])` and `cache.fetch('foo')` should generate
different cache keys as they are not equivalents.

[related #8615]
[related #8614]
Make exists? use bound values.

When we build a query with an inline value that is a numeric (e.g.
because it's out of range for an int4) PostgreSQL doesn't use an index
on the column, since it's now comparing numerics and not int4s.

This leads to a _very_ slow query.

When we use bound parameters instead of inline values PostgreSQL
raises numeric_value_out_of_range since no automatic coercion happens.
Variants in ActionView::Digestor

Take variants into account when calculating template digests in
ActionView::Digest.

Digestor#digest now takes a hash as an argument to support variants and
allow more flexibility in the future. Old-style arguments have been
deprecated.

Fixes #14242
Fix for external generators extend Erb::Generators

HAML and probably other generators extend this class and invoke
filename_with_extensions with the old signature (without format).
This makes the second argument optional and defaults it to the #format
method which could be overridden as well.

Closes #14132.
Always return an array from formats so there is no need to wrap it when calling
Merge pull request #14243 from pch/digestor-variants

Variants in ActionView::Digestor
Allow string hash values on AR order method

This behavior has almost no performance impact:

String not allowed  66.910000   0.030000  66.940000 ( 67.024976)
String allowed      69.360000   0.030000  69.390000 ( 69.503096)

Benchmarked with http://git.io/Y0YuRw.
Merge pull request #14269 from arthurnn/expanded_key_array

Cache key should be different when is Array.
Revert "Merge pull request #14269 from arthurnn/expanded_key_array"

This reverts commit 475c96589ca65282e1a61350271c2f83f0d4044f, reversing
changes made to 705915ab5cf24430892107764b0050c07e1df583.

We decided that this is not worth busting everyone's cache as this
seems like a very unlikely problem. The problem only occurs when the
user is 1) not using a namespace, or 2) using the same namesapce for
different *kinds* of cache items. The recommended "fix" is to put
those cache items into their own namspace:

    id = 1
    Rails.cache.fetch(id, namespace: "user"){ User.find(id) }

    ids = [1]
    Rails.cache.fetch(ids, namespace: "users"){ User.find(ids) }

See the discussion on #14269 for details.
Merge pull request #14261 from MSch/bound-parameters-for-exists

Make exists? use bound values.
Merge pull request #14263 from robin850/allow_passing_string_to_order_hash

Follow up of #10732 - Allow string hash values on AR order method
quick pass over Active Record CHANGELOG. [ci skip].
docs, flash message keys are normalized to strings. [ci skip]

This is a follow up to a668beffd64106a1e1fedb71cc25eaaa11baf0c1
we only need to support `asc` and `ASC`. No need for mixed cases. #14263

This is a result of the discussion at https://github.com/rails/rails/pull/14263/files#r10291489
get rid of intermediate arrays.

origin: https://github.com/rails/rails/commit/f6aeb8b1a3687c8523e4a56309fe3736011b2935#commitcomment-5569649
Remove a reference to an issue [ci skip]

This actually not an issue fixing ; the changelog is referring to the
introducing pull request itself.