Allow uint discriminants and store them as such

Infers type of constants used as discriminants and ensures they are
integral, instead of forcing them to be a signed integer.

Also, stores discriminant values as uint instead of int interally and
deals with related fallout.

Fixes issue #7994
Add test for uint and negative literals as discriminants