HDFS-7291. Persist in-memory replicas with appropriate unbuffered copy API on POSIX and Windows. Contributed by Xiaoyu Yao.

(cherry picked from commit c6f04f391b54e57467b3ae5d0a95bd96e7feaa82)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt