HDFS-7438. Consolidate the implementation of rename() into a single class. Contributed by Haohui Mai.