merged r1372708 from branch-1: HDFS-3658. Fix bugs in TestDFSClientRetries and add more tests. Contributed by Tsz Wo Sze.