"convert_to" casts before comparison with Infinity

Some costs were provided as a BigDecimal, which cannot be compared with
a Float::INFINITY.

Closes quintel/etmodel#1823