HIVE-6988. Hive changes for tez-0.5.x compatibility.  And, additional changes for building tez 0.5 in Makefile