IMPALA-1535: Partition pruning with NULL

This commit fixes the issue where partition pruning returns wrong
results when a binary predicate contains a NULL literal.

Change-Id: I24c647184dcef49d12d6ff422e28667777df7784
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5443
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5549
CDH-23776: Compute stats crashes Impala with a HS2 V6 client

COMPUTE STATS runs two child queries via the HS2 interface. When the
client that is issuing the parent query is also using HS2, Impala would
inherit the protocol version from the parent for use in the child
queries, and that particularly affected the orientation that results were
returned in. However, the compute stats post-processing path assumed that
the results were in V1 (i.e. row-major) format.

This patch adds a new key-value pair to the HS2 conf overlay to tell
Impala that this is a child query. When it is set, Impala always uses
the V1 protocol internally, meaning that child query results are always
returned in row-major format. Since they are always consumed internally,
and never sent to the user directly, this is a viable simplification.

Change-Id: I9846ec2cb6a4f3b54ab0d29dd4a99916442b8e71
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5538
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins