[SQL] Improve column pruning in the optimizer.

Author: Michael Armbrust <michael@databricks.com>

Closes #378 from marmbrus/columnPruning and squashes the following commits:

779da56 [Michael Armbrust] More consistent naming.
1a4e9ea [Michael Armbrust] More comments.
2f4e7b9 [Michael Armbrust] Improve column pruning in the optimizer.

(cherry picked from commit f99401a6308d5b9a9259d7597a35ba92f927aa50)
Signed-off-by: Reynold Xin <rxin@apache.org>