HDFS-7528. Consolidate symlink-related implementation into a single class. Contributed by Haohui Mai.