[SPARK-4661][Core] Minor code and docs cleanup

Author: zsxwing <zsxwing@gmail.com>

Closes #3521 from zsxwing/SPARK-4661 and squashes the following commits:

03cbe3f [zsxwing] Minor code and docs cleanup

(cherry picked from commit 30a86acdefd5428af6d6264f59a037e0eefd74b4)
Signed-off-by: Reynold Xin <rxin@databricks.com>