[SPARK-4245][SQL] Fix containsNull of the result ArrayType of CreateArray expression.

The `containsNull` of the result `ArrayType` of `CreateArray` should be `true` only if the children is empty or there exists nullable child.
I like this approach of having a separate equals function (In my experience overriding the standard `equals` to do loose equality is a recipe for disaster).  What do you think about moving this function into `DataType` though?  seems like it could be generally useful.