HDFS-624. Support a new algorithm for pipeline recovery and pipeline setup for append. Contributed by Hairong Kuang.