[SQL] A tiny refactoring in HiveContext#analyze

I should use `EliminateAnalysisOperators` in  `analyze` instead of manually pattern matching.

Author: Yin Huai <huaiyin.thu@gmail.com>

Closes #1881 from yhuai/useEliminateAnalysisOperators and squashes the following commits:

f3e1e7f [Yin Huai] Use EliminateAnalysisOperators.

(cherry picked from commit 647aeba3a9e101d35083f7c4afbcfe7a33f7fc62)
Signed-off-by: Michael Armbrust <michael@databricks.com>