[SPARK-2052] [SQL] Add optimization for CaseConversionExpression's.

Add optimization for `CaseConversionExpression`'s.
Hi,
I just cared that the conversions were used redundantly like `UPPER(LOWER(str))`, which would be a mistake in most case, though.