[MLLIB] use Iterator.fill instead of Array.fill

Iterator.fill uses less memory

Author: Xiangrui Meng <meng@databricks.com>

Closes #1930 from mengxr/rand-gen-iter and squashes the following commits:

24178ca [Xiangrui Meng] use Iterator.fill instead of Array.fill

(cherry picked from commit 7ecb867c4cd6916b6cb12f2ece1a4c88591ad5b5)
Signed-off-by: Xiangrui Meng <meng@databricks.com>