[SPARK-2187] Explain should not run the optimizer twice.

@yhuai @marmbrus @concretevitamin