IMPALA-1337: Aggregation failures for VARCHAR

The issue is that the aggregation node needed to use IsVarLen; previously
it assumed TYPE_STRING was the only variable length type.

Change-Id: I9545e8d405937a47b25c9042f97854851a448c6e
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4690
Reviewed-by: Victor Bittorf <victor.bittorf@cloudera.com>
Tested-by: jenkins
IMPALA-1261: The shell should not strip comments from the query text.

This patch enables the shell to pass query strings as-is to Impala's parser. In order to
preserve previous behaviour, we transform multi-line queries before writing them to
history. We replace EOL with an obscure ascii character (DLE), and re-apply the
transformation when reading it back from history.

Change-Id: I021b9c3d50b03df73bea1afd6ce3ec6b413484e0
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4664
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: jenkins
Fix potential crach on teardown in BE unit tests.

This is causing the exhaustive code coverage run to fail.

Change-Id: I61a08064190371fb72cce6e444db6c6fa706a500
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4696
Reviewed-by: Daniel Hecht <dhecht@cloudera.com>
Tested-by: jenkins
PA/PHJ: Increase fanout to 32 and fix interaction with small buffers.

Small buffers introduced an issue that is exacerbated by the large fanout. A stream can
only be appended to forever once it has grabbed the initial io sized buffer. With small
buffers, we don't grab that at the beginning anymore and, before this patch, it is
grabbed when the stream first needs it. This means when one stream needs it, another
stream could have already grabbed it (meaning this stream is pinned with multiple
buffers).

This patch has all the streams grab an IO buffer as soon as the first stream needs an
io buffer. This guarantees that all streams get 1 before any get 2.

Change-Id: I639697434f6b3c0e2a957581bd42790a4b5f2cf4
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4687
Tested-by: jenkins
Reviewed-by: Nong Li <nong@cloudera.com>