correctly parse all integer types. fixes #9289

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

The method will be specialized anyway; it's just more efficient not to have 5 copies of basically the same source code. Using `@eval` forces all 5 copies to exist; relying on specialization only generates new code for cases that are actually used. Also `@eval` and `$` are just ugly.