Returns a Long if possible (e.g. within range [Long.MIN_VALUE,
Long.MAX_VALUE], and with no decimals), otherwise a Double.
If IntegerOnly is set, will stop at a decimal
point (or equivalent; e.g. for rational numbers "1 2/3", will stop
after the 1).
Does not throw an exception; if no object can be parsed, index is
unchanged!