Fix Issue 10717 - std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char)

Turns out it was incorrectly working for enum types.

New semantics are that enums are also accepted, and their OriginalType is returned.