Make ArrayType comparable

Following
https://github.com/facebook/presto/issues/1816

A = B if they have the same cardinality and every element in A is equal to the corresponding element in B
A < B if
for some 1 <= k <= min(cardinality(A), cardinality(B)), A[i] = B[i] for every i < k and A[k] < B[k]
or, for every 1 <= i <= cardinality(A), A[i] = B[i] and cardinality(A) < cardinality(B)
Unfortunately this doesn't work. The stack encoding for array is a JSON array, and the elements of that array are in the stack encoding of `elementType`. You need to unpack the array and then compare each element using the equalTo method of `elementType`. Take a look at how `MaxBy` does this