HDFS-7122. Use of ThreadLocal<Random> results in poor block placement. (wang)

(cherry picked from commit d7086c563ff2847c415913ac625b2a557eeccbdd)