Fix query with nested array in Active Record

`User.where(id: [[1,2],3])` was equal to `User.where(id:[1, 2, 3])`
in Rails 4.1.x but because of some refactoring in Arel this stopped
working in 4.2.0. This fixes it in Rails. Fixes #16580.
[Dan Olson & Cristian Bica]

/cc @sgrif @matthewd @DanOlson @chancancode 
Ok. I'll remove the uniq

On Sat, Sep 6, 2014 at 4:28 PM, Sean Griffin <notifications@github.com>
wrote:

>> @@ -2,6 +2,14 @@ module ActiveRecord
>>    class PredicateBuilder
>>      class ArrayHandler # :nodoc:
>>        def call(attribute, value)
>> +
>> +        if value.any? { |val| val.is_a?(Array) }
>> +          ActiveSupport::Deprecation.warn "Passing a nested array to Active Record " \
>> +            "finder methods is deprecated and will be removed. Flatten your array " \
>> +            "before using it for 'IN' conditions."
>> +          value = value.flatten.uniq
>> +        end
> That should be out of the scope of this PR , and should be handled more generally elsewhere  if we actually want to do this (we don't)
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/rails/rails/pull/16825/files#r17208481