Fix float to string conversion for inf and nan

Right now the output of `tests/system/tfloatToString.nim` is wrong (inf, -inf and nan have .0 appended). This fixes it so that the expected values are returned.