Fix for bug 1336106: HDFS files without permission causes core dump

Missing HDFS permissions caused Hive queries in Trafodion to crash
instead of giving an error message. Added a workaround to the bug
in libhdfs and also added more error handling to the HDFS statistics
code.

7/17: Rework from comments for patch set 1.
7/20: Rework from comments for patch set 2.

Change-Id: Ibb8cfe4ce0aca389598bc6724dbd0702961b5a30
Merge "Fix for bug 1336106: HDFS files without permission causes core dump"