Use polymorphism instead of case/when

1)delete the original initialize function of class Range. Use a new one with 2 parameters.

2)Use polymorphism instead of case/when(Line 144 & 145)

3)Add a function called range_compatible_type?(type) to detect whether type belongs to Date, Time, Decimal, Integer.