Add polymorphism and not use symbols any more

(1)Not use symbols to initialize Range any more.
now its like this:
        register_type 'daterange', OID::Range.new(OID::Date.new, OID::Date.new)
        register_type 'numrange', OID::Range.new(OID::Decimal.new, OID::Decimal.new)
        register_type 'tsrange', OID::Range.new(OID::Time.new, OID::Time.new)
        register_type 'int4range', OID::Range.new(OID::Integer.new, OID::Integer.new)

(2)delete the method infinity.Because its useless. -1 can replace it!

(3)modify the initialize function, now its like this:
          def initialize(left_type, right_type)
            @left_type  = left_type
            @right_type = right_type
          end

(4)change the function type_cast to type_cast_of_from and type_cast_of_to in class Date, Time, Decimal and Integer to get "from" and "to".

(5)use polymorphism instead of case/when.
now its like this:
            from = @left_type.type_cast_of_from extracted
            to   = @right_type.type_cast_of_to extracted

Add polymorphism and not use symbols any more

(1)Not use symbols to initialize Range any more.
now its like this:
        register_type 'daterange', OID::Range.new(OID::Date.new, OID::Date.new)
        register_type 'numrange', OID::Range.new(OID::Decimal.new, OID::Decimal.new)
        register_type 'tsrange', OID::Range.new(OID::Time.new, OID::Time.new)
        register_type 'int4range', OID::Range.new(OID::Integer.new, OID::Integer.new)

(2)delete the method infinity.Because its useless. -1 can replace it!

(3)modify the initialize function, now its like this:
          def initialize(left_type, right_type)
            @left_type  = left_type
            @right_type = right_type
          end

(4)change the function type_cast to type_cast_of_from and type_cast_of_to in class Date, Time, Decimal and Integer to get "from" and "to".

(5)use polymorphism instead of case/when.
now its like this:
            from = @left_type.type_cast_of_from extracted
            to   = @right_type.type_cast_of_to extracted

Add polymorphism and not use symbols any more

(1)Not use symbols to initialize Range any more.
now its like this:
        register_type 'daterange', OID::Range.new(OID::Date.new, OID::Date.new)
        register_type 'numrange', OID::Range.new(OID::Decimal.new, OID::Decimal.new)
        register_type 'tsrange', OID::Range.new(OID::Time.new, OID::Time.new)
        register_type 'int4range', OID::Range.new(OID::Integer.new, OID::Integer.new)

(2)delete the method infinity.Because its useless. -1 can replace it!

(3)modify the initialize function, now its like this:
          def initialize(left_type, right_type)
            @left_type  = left_type
            @right_type = right_type
          end

(4)change the function type_cast to type_cast_of_from and type_cast_of_to in class Date, Time, Decimal and Integer to get "from" and "to".

(5)use polymorphism instead of case/when.
now its like this:
            from = @left_type.type_cast_of_from extracted
            to   = @right_type.type_cast_of_to extracted

Update oid.rb

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.

I merger these 5 commits because this is the final version. And I'm learning how to rebase.