Make HashWithIndifferentAccess#select always return the hash.

Hash#select! returns nil if the hash didn't change and thus behaves differently
from select, so it's return value can't be used as result for the latter.
Merge pull request #11327 from schuetzm/hash-with-indifferent-access-select

Make HashWithIndifferentAccess#select always return the hash.
Extract common query to a constant.

Perf ref: https://gist.github.com/vipulnsward/8209749201dfdd678c97
Merge pull request #11329 from vipulnsward/cache_one

Extract common query to a constant.
Remove action view test duplication

Same test exists above 2 or 3 lines.
Merge pull request #11332 from sanemat/fix/av-test-duplication

Remove actionview test duplication
Add `#any_of` query method to active_record

This method is inspired by [any_of from
mongoid](http://two.mongoid.org/docs/querying/criteria.html#any_of).

It allows to compute an `OR` like query that leverages AR's `#where` syntax:

    manual_removal = User.where(id: params[:users][:destroy_ids])
    users = User.any_of(manual_removal, "email like '%@example.com'", {banned: true}).destroy_all

It can be used directly on model class, or through an association, or
behind an other relation.

    manual_removal = User.where(id: params[:users][:destroy_ids])
    User.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    @company.users.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    User.where(offline: false).any_of( manual_removal, "email like '%@example.com'", {banned: true})

Its main purpose is to both :

* remove the need to write a sql string when we want an `OR`
* allow to write dynamic `OR` queries, which would be a pain with a string

There's also a negative version, `#none_of`. This will return all active
users :

    banned_users = User.where(banned: true)
    unconfirmed_users = User.where("confirmed_at IS NULL")
    active_users = User.none_of(banned_users, unconfirmed_users)