IMPALA-741: Support partitions with non-existant HDFS locations

If a partition had a location that did not exist in HDFS, Impala would
refuse to load its metadata. This meant a typo could render a table
unloadable. We fix this problem by removing the existence check from the
frontend, and by inheriting access from the first extant parent of the
partition directory.

Fixing this exposed a second issue, where Impala wouldn't create
directories for partitions in the right place after an INSERT if the
partition location had been changed. To get this right we have to plumb
the partition ID through to Coordinator::FinalizeSuccessfulInsert(), so
that the coordinator can look up the partition's location from the
query-wide descriptor table. As a by-product, this patch rationalises
the per-partition, per-fragment statistics gathering a little bit by
putting almost all the per-partition stats into TInsertPartitionStatus.

Change-Id: Ia76419ea1dda95e2d2e99153355df6ff51fd2e7a
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2528
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
Cache permissions between checks

Rather than repeatedly call getFileStatus() to perform different
permission checks on the same file, this patch adds a Permissions object
that caches the results of getFileStatus() to serve multiple permission
checks without multiple RPCs.

Change-Id: I3891d20e19ca3ec5d80461d81650679747fbcb1c
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2819
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
IMPALA-1027 - Fix overflow in row count summary returned by CTAS

Change-Id: I1a538d4deec92db6a95166a081106f07e0787c1e
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2829
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins