HDFS-5758: add safe mode tests