HDFS-7104. Fix and clarify INodeInPath getter functions. Contributed by Zhe Zhang.

(cherry picked from commit f0293f11a85176afc04d809574c9126a80b700cc)