correctly parse all integer types. fixes #9289

Used `parseint` and `parsefloat` methods instead of `float64_isvalid`.

This is our fault for not having a good API for this. Given when you have to work with, this is the only way. But it's still terrible :-)