Revert "Port all remaining self.protected_instance_variables to class methods"

This reverts commit 7de994fa215e9f4c2856d85034bc4dd7b65d0c01.
Return to using protected_instance_variables in AV
Merge pull request #12110 from strzalek/revert-default-protected-instance-vars

Revert default protected instance vars
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 is hooked on `WhereChain`, just like `#not`, and allows to compute an
`OR` like query that leverages AR's `#where` syntax:

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

It can be used anywhere `#where` is expected to work :

    manual_removal = User.where(id: params[:users][:destroy_ids])
    User.where.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    @company.users.where.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    User.where(offline: false).where.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.where.none_of(banned_users, unconfirmed_users)