[SQL] Fix Performance Issue in data type casting

Using lazy val object instead of function in the class Cast, which improved the performance nearly by 2X in my local micro-benchmark.

Author: Cheng Hao <hao.cheng@intel.com>

Closes #679 from chenghao-intel/fix_type_casting and squashes the following commits:

71b0902 [Cheng Hao] using lazy val object instead of function for data type casting

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