Fix parseInteger for uppercase letters

parseDigit and (by extension) parseInteger could not parse integer
literals with uppercase letters.
Add tests for parseInteger for uppercase letters

To test the fix in the previous commit (fa40598).