Support infinity time and date values. String values which can not be parsed/formatted
are now passed through instead of raising an exception.
Format infinity and nan values equally to Float#to_s.
This fixes a test case in activerecord.