Fix handling of short, invalid inputs to parseNumberFromString() and its ilk.

There were two notable bugs.  The strings "+" and "-" were parsing successfully as the
number 0.  The strings "0x" and "0X" were also parsing successfully as the number
0, when they should be an error.